high CPU usage

vb.net , cpu usage , mysql India
  • 12 years ago
    Hi, I have an VB.net application .In it ,datas are inserted into the mysql database every 1s.CPU usage is 50 to 60%.Is there any way to control the CPU usage of the application developed in visual studio dot net accessing mySQL database? Can anyone help me out.
  • 12 years ago
    Hi, welcome to developerFusion! Are you expecting the CPU usage to be high? One of the easiest things to do would be to throttle back the number of queries you're executing - say executing one every 10 seconds instead. It will take longer, but leave the machine free to do other things. Alternatively you could look at lowering the [thread priority](http://msdn.microsoft.com/en-us/library/system.threading.thread.priority.aspx) of your application? Hope that helps?
  • 12 years ago
    also you can place counter into execution cycle, and e.g. for each 14 runthrough call Application.DoEvents, but this solution suppose you want user to have application accessible, or you disable some controls for him... fastest implementation of 14 r, is IF Mod(counter, 14) = 0 Then ...

    Hope this is also alternative :)

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Nine people can't make a baby in a month.” - Fred Brooks