|
-
Aug 10th, 2010, 05:59 PM
#1
Thread Starter
Fanatic Member
How do I improve (reduce) my app memory and cpu usage
Hello guys,
I am developing an application that manipulates big strings in memory, basically the app filter, sort, extract some strings from plain text files.
The text files am currently working of is 4MB, but am putting a maximum files size of 10 MB in mind as i work.
First i have an open feature, so my app loads the text file to a textbox, and when i click on a button, it starts to do its work.
Observing a compiled version of my app, its cpu usage goes up as high as 99% , and the memory usage jumps high to 100MB .
My system has 767MB memory 2.4GH processor power.
In order to make the GUI responsive i put the code in a dll, and before starting the process here is the code i use
vb Code:
'create buffer
sTemp = Space$(Len(txtOut.Text)) ' this line take a minute of more for 3MB text
'copy from textbox to buffer
retval = lstrcpy(sTemp, txtOut.Text) ' this take about 15 seconds for the same 3mb text
where i need your help is to improve this routines so as to take less cpu and memory usage
Is there a way i can assign max memory my app can use?
Please any ideas are welcomed
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
|