General Info on Optimization
have this Sub that will test a particular Condition every time even though it will always be the Same.
There are around 4 Subs that Exist + 2 Other Completly Different onces.
I thought of Testing the particulat condition once, then go to the Sub relevant, which then has no test.
if the Condition is False(above) then do something else, which makes means I duplicate the first Sub's Else Condition. Therefore 8 Subs will now exist(4x2) + the Other non Related onces.
Here's What I thought:
If I test each time in the sub for each Parameter, it will still be faster as having 8 Subs + 2 means the Program is Larger, taking up more space in Memory as Windows usually Loads the Entire App into memory?
Whats your opinion?
I Noticed just making a App with No Functionality runs At 11 MB in Memory!!
Re: General Info on Optimization
A few methods will take up next to no memory. You would want to be making a substantial difference to the memory footprint to sacrifice performance. Can't really say more than that because I'm afraid I don't really understand your description of the method relationships.
Re: General Info on Optimization
Quote:
Originally Posted by Codehammer
I Noticed just making a App with No Functionality runs At 11 MB in Memory!!
Win forms projects do that - this is because of what gets loaded for such projects (mscorlib.dll, forms.dll, system.dll, drawing.dll). Don't sweat it as this is normal for .Net apps, which are generally more memory-intensive than COM apps.
Re: General Info on Optimization
There is a performance penalty for an If statement. However, if your program is so demanding that this kind of a penalty is even noticeable, you shouldn't be using .NET for the project.
As for memory footprints: Memory is cheap. I just bought a new computer that has twelve times as much system memory as my first hard drive did, and there are plenty of people here who have even higher ratios. Expect this trend to continue. System memory of 1-2 GB will probably be standard within a year, so what difference does it make if you have a few extra KB. Sure, it could be seen as sloppiness, but if you are trading extra size for extra efficiency, I would go for the extra size every time (except for embedded systems).
Re: General Info on Optimization
A Image that I Embeded in the Project is called when A specific condition is reached and displays. After reading the Stream I Flush the Stream, then Close it.
last Nighti noticed the App at 5MB in Memory, then I tried to Write a CD and the Buffer was So low in the system, I had to first End a Few Apps.
Maybe the Flush in the Code =- =What does that do opposed to .close?
Re: General Info on Optimization
A Image that I Embeded in the Project is called when A specific condition is reached and displays. After reading the Stream I Flush the Stream, then Close it.
last Night I noticed the App at 5MB in Memory, then I tried to Write a CD and the Buffer was So low in the system, I had to first End a Few Apps.
Maybe the Flush in the Code =- =What does that do opposed to .close?