Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have application that reads EXCEL ( HUGE ) document and looks for rows that .....

 

Major problem is that my application use 100% processor time for 4-5 minutes and my application is frozen during that time ( witch is bad :mad: )

Is it possible to limit procesor usage to n% processor time?

 

:confused:

Some people are wise and some are other-wise.
  • Administrators
Posted

If you are searching in a loop you could put an Application.DoEvents in there somewhere to allow the application to process windows messages and redraw itself.

If you look under System.Threading you could drop the priority of the current thread so at least it doesn't hog the CPU.

 

System.Threading.Thread.CurrentThread.Priority=Threading.ThreadPriority.BelowNormal

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...