|
-
October 31st, 2006, 02:18 PM
#1
CPU Usage
I just finished a program that basically waits for tag files to be put into the directory its pointing too and then executes commands based on what the tag file is. When it loads, it loads information from a database to an arrray and then loops.
I noticed that the cpu usage is jumping between 25-35% and I'm curious if there is anything I can do about it.
I have a program that does the same thing written in Winbatch and that jumps between 0%-20%.
Lemme know if more information is needed.
fyi - I'm writing in C# to broaden my horizons.
-
October 31st, 2006, 03:06 PM
#2
Re: CPU Usage
Well, WinBatch is a scripting language and doe not have the heavy FrameWork to interact with. But then again, WinBatch is not anywhere nearly as powerful as .NET. 
Optimizing your app could be done with some freeware analyzer utilities or if your running the Team system you will have analyzer utilities already installed with it.
It all just depends on what your app is doing and the code logic. Doing many loops where you could do things in a single line are a good place to start. Inserts into a db with a stored procedure instead of executing unprepared sql statements is another point to look at etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|