When I run my VB.NET Windows Forms application, the CPU usage jumps up to
100%. If I drop-down a menu, the usage goes down to a more reasonable
number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this
the norm for VB.NET apps?
Thanks in advance. 11 4583
This is normal.
OHM#
David Schwartz wrote: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Thanks in advance.
Regards - OHM# On**********@BTInternet.com
Actually, are you saying once started the application continues to grab 100%
until you cause a dropdown event ?, if so this is not normal. The processing
time will peak when you start the application, but should not remain in this
state after loading unless you have some thread running or some event is
continually firing which doesent sound right.
There are some free profiler tools around which can assist you in finding
bottlenecks in your application.
One Handed Man [ OHM# ] wrote: This is normal.
OHM#
David Schwartz wrote: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Thanks in advance.
Regards - OHM# On**********@BTInternet.com
Regards - OHM# On**********@BTInternet.com
If this is normal, what would you say to users who complain about this?
Thanks.
"One Handed Man [ OHM# ]" <te***************************@BTOpenworld.com>
wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... This is normal.
OHM#
David Schwartz wrote: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Thanks in advance.
Regards - OHM# On**********@BTInternet.com
http://www.platformdev.com/AO2_pdProfiler.htm
Try this, it may well help define where the problem is
OHM
David Schwartz wrote: If this is normal, what would you say to users who complain about this? Thanks.
"One Handed Man [ OHM# ]" <te***************************@BTOpenworld.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... This is normal.
OHM#
David Schwartz wrote: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Thanks in advance.
Regards - OHM# On**********@BTInternet.com
Regards - OHM# On**********@BTInternet.com
* "David Schwartz" <da**@hr-symphony.com> scripsit: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Does it remain at 100% if you don't show a messagebox? Does that even
occur in a blank project? What are you doing at startup?
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
The OP's initial statement was not crystal clear really. I initially thought
he meant that the app peaked at 100% on startup, so I posted a follow up
question ( look above ) which he has not come back to.
I'm not sure if he has not had time, solved it or got annoyed ?
Regards - OHM
Herfried K. Wagner [MVP] wrote: * "David Schwartz" <da**@hr-symphony.com> scripsit: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Does it remain at 100% if you don't show a messagebox? Does that even occur in a blank project? What are you doing at startup?
Regards - OHM# On**********@BTInternet.com
Hi,
Something in your code is causing this. What are you doing after startup?
BTW, this IS NOT normal. However, there are things, like polling loops,
that will/can result in 100% processor usage. Also, not, that 100%
processor usage means that your process is consuming 100% of the time
allocated to it, not that it is consuming 100% of all possible time --
multitasking still works, though other apps may be slowed.
Dick
--
Richard Grier (Microsoft Visual Basic MVP)
See www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Thanks for the responses everyone. I solved the problem.
Don't laugh, but this is what it was:
At the end of Sub Main, there was an infinite loop with a DoEvents in it!
The purpose of this loop was apparently to keep Sub Main from ending and the
app terminating as a result. I got rid of the infinite loop and moved the
Sub Main code into a Startup form instead and now the CPU usage drops back
down after the app starts up.
"One Handed Man [ OHM# ]" <On**********@BTInternet.com> wrote in message
news:u1**************@tk2msftngp13.phx.gbl... The OP's initial statement was not crystal clear really. I initially
thought he meant that the app peaked at 100% on startup, so I posted a follow up question ( look above ) which he has not come back to.
I'm not sure if he has not had time, solved it or got annoyed ?
Regards - OHM Herfried K. Wagner [MVP] wrote: * "David Schwartz" <da**@hr-symphony.com> scripsit: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Does it remain at 100% if you don't show a messagebox? Does that even occur in a blank project? What are you doing at startup?
Regards - OHM# On**********@BTInternet.com
Yeah Dick, read ALL the posts before replying. I followed up my post with a
caviat
OHM
Dick Grier wrote: Hi,
Something in your code is causing this. What are you doing after startup?
BTW, this IS NOT normal. However, there are things, like polling loops, that will/can result in 100% processor usage. Also, not, that 100% processor usage means that your process is consuming 100% of the time allocated to it, not that it is consuming 100% of all possible time -- multitasking still works, though other apps may be slowed.
Dick
Regards - OHM# On**********@BTInternet.com
Glad u solved it David.
Regards - OHM
David Schwartz wrote: Thanks for the responses everyone. I solved the problem.
Don't laugh, but this is what it was:
At the end of Sub Main, there was an infinite loop with a DoEvents in it! The purpose of this loop was apparently to keep Sub Main from ending and the app terminating as a result. I got rid of the infinite loop and moved the Sub Main code into a Startup form instead and now the CPU usage drops back down after the app starts up.
"One Handed Man [ OHM# ]" <On**********@BTInternet.com> wrote in message news:u1**************@tk2msftngp13.phx.gbl... The OP's initial statement was not crystal clear really. I initially thought he meant that the app peaked at 100% on startup, so I posted a follow up question ( look above ) which he has not come back to.
I'm not sure if he has not had time, solved it or got annoyed ?
Regards - OHM Herfried K. Wagner [MVP] wrote: * "David Schwartz" <da**@hr-symphony.com> scripsit: When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox comes up.
Has anyone else noticed or experienced this? Why would this be? Is this the norm for VB.NET apps?
Does it remain at 100% if you don't show a messagebox? Does that even occur in a blank project? What are you doing at startup?
Regards - OHM# On**********@BTInternet.com
Regards - OHM# On**********@BTInternet.com
I did read them. I was adding a point.
--
Richard Grier (Microsoft Visual Basic MVP)
See www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg Pedder |
last post by:
Hello. I have an application that uses the Java Communications API to use a
modem. At startup,
the application checks to see what serial devices are connected. For each
serial device, the app...
|
by: Felix E. Klee |
last post by:
Hi,
why does the memory consumption of the program attached below increase
steadily during execution? Shouldn't vector::reserve() allocate one
large memory chunk of memory that doesn't change...
|
by: DraguVaso |
last post by:
Hi,
How can I keep the memory usage and CPU usageas low as possible in a VB.NET
application? any special techniques, any things to consider?
Thanks a lot in advance,
Pieter
|
by: John Wood |
last post by:
As everybody points out, the best way to reduce the memory footprint of a
..net application is to minimize it and restore it. This can make my app go
from 40Mb of usage to about 3Mb of usage. Of...
|
by: Tim T. |
last post by:
I'm currently working on a report to forecast production for finished goods.
The user can select one or more items to forecast. In addition, they may
select one or more warehouses to view...
|
by: Kevin Chabot |
last post by:
I am working on an application in c# that runs in the background.
All it does is monitor a value from a performance counter using a timer. It then draws these values in a chart
Now, this...
|
by: Dave Stienessen |
last post by:
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few...
|
by: Sirisha |
last post by:
I am using the following code to get the CPU usage
PerformanceCounter myCounter;
myCounter = new PerformanceCounter();
myCounter.CategoryName = "Processor";
myCounter.CounterName = "%...
|
by: Ikke |
last post by:
Hi,
In my stylesheet I've set the width of a table to 100% - in Opera and
Firefox, the table is placed within the containing div and it takes up the
total amount of width available.
However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |