Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Performance vs Memory


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2008, 05:39 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 487
Awards Showcase
Beta Tester 
Total Awards: 1
Question Performance vs Memory

I'm well under way with my SMS application now, but as I add more functions it dawned on me that maybe my approach is wrong.

Basically I'm using one Form and several panels.
All is working well so far, but at present I just set the visibility of the controls as required (Erels runtime example has been a tremendous help... Runtime controls manipulation).

So far the application is fast and works exactly as I intended.
But, and here is the question, should I really be disposing the controls instead of hiding them?

I ask this because the application will be running in the background the whole time my Device is switched on and so I want it to hog as little of the resources as possible.
Maybe I'm misgiven in my assumption that more controls (even if hidden) means more memory, and I'd be grateful of some advice on this matter.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #2 (permalink)  
Old 02-09-2008, 06:30 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,900
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by RandomCoder View Post
Maybe I'm misgiven in my assumption that more controls (even if hidden) means more memory, and I'd be grateful of some advice on this matter.
You are not mistaken, instantiated controls will take extra memory even when hidden. However if you are only talking about a few (say ten or fewer) it probably doesn't matter much in the great scheme of things. If you are talking about a lot (many tens) it will be a trade off of memory saving by disposing them against the time taken to rebuild them when needed. Look and see (Settings->System->Memory Program memory in use) how much memory your app uses when it is started and make up your mind then.
Reply With Quote
  #3 (permalink)  
Old 02-09-2008, 09:27 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 487
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks Agraham, I wish I had your indepth knowledge of these things.
Unfortunately your repy is exactly as I already expected.
Can I ask, have you any formal qualifications in programming? I've a little knowledge of C and VHL and work with Ladder Logic (if you can call that a language ). Just wondering if there is any hope for me
Maybe I've had a few too many beers tonight!

Thanks,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #4 (permalink)  
Old 02-10-2008, 11:19 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,900
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by RandomCoder View Post
Can I ask, have you any formal qualifications in programming?
Not really but I have been in computers all my life. I saw my first one when I was about eleven, an early Ferranti with valves and mercury delay lines and was instantly hooked. I graduated in 1968 with a BSc in Electronic Engineering, as there were no computer specific cources in those days, and joined Ferranti. Ever since then I have been involved in hardware, software and overall computer System Design. I guess I'm lucky, logic seems to be the one thing I can honestly say that I'm any good. Other peoples' brains seem to be wired for music or art or literature - mine seems to be wired for computer sytems design.
Reply With Quote
  #5 (permalink)  
Old 02-10-2008, 05:03 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 487
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
.... Other peoples' brains seem to be wired for music or art or literature - mine seems to be wired for computer sytems design.
Nice one.

I've a degree in engineering, but these days they try to cover too much in the courses and so I've only touched on C and VHL, the rest I have picked up myself through trial and error.

I always consider programming to be like handwriting... everyone has their own style and way of writing - it's just that some people's is more elegant than others.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dim memory usage JamesC Questions & Help Needed 2 07-21-2008 09:09 AM
Images and memory wolfgang Questions & Help Needed 5 02-23-2008 06:08 PM
Performance on Bitmap? Roadrunner Questions & Help Needed 9 12-09-2007 03:19 PM
How much memory remains? willisgt Questions & Help Needed 1 12-05-2007 08:55 AM
Memory Usage Scubaticus Questions & Help Needed 6 07-03-2007 06:37 PM


All times are GMT. The time now is 05:26 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0