Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) 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 Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 614
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... http://www.basic4ppc.com/forum/tutorials/907-runtime-controls-manipulation.html).

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
__________________
"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: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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 Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 614
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
__________________
"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: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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 Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 614
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
__________________
"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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0