Guest spacemonkey Posted April 27, 2003 Report Posted April 27, 2003 If you want to close all background apps on the phone in order to make your game/movie player run faster try this: SHCloseApps (xxxxx); where xxxxx is how many bytes you reckon you need of memory. Now, realistically we don't need much memory but, we can lie. So to clear the phone down SHCloseApps(20000000); Basically this asks for 20 Mb of memory. The way the OS works is that if available memory drops below 128k then the phone will automatically start sending WM_HIBERNATE and WM_KILL messages to applications. However, by calling SHCloseApps and asking for loads of memory, the system goes into this process now rather than waiting till the memory is all gone, so it WM_HIBERNATE and WM_KILLs all of the background apps. I've tested this on mine with no adverse effects, it closed all applications except tray and programs (although I'd like to kill programs, but oh well). I also checked and it did leave processes such as SmartFace alone. Note: the game will take longer to load as it will pause while the OS is processing these calls.
Guest EMGenius Posted April 27, 2003 Report Posted April 27, 2003 this all sounds really clever and good, but could you possibly translate it into simple speak for the not-so-genius (ie me!!;)) people!!?? I have just read it twice and still have no idea what you are talkimg about!!!??? mabe i am just being dumb (in which case feel free to take the piss!!!!) ta! EM(not so)G
Guest Palindrome Posted April 27, 2003 Report Posted April 27, 2003 Would it be worth writing a small standalone app that does this? I'd certainly give it a go if I knew my ass from my elbow as far coding for the SPV is concerned.
Guest midnight Posted April 27, 2003 Report Posted April 27, 2003 emg, its coder speak for a filthy way of shutting down apps when launching your own so it frees up valuable memory. and yes it would be easy to make a small app that would say, run when you use a speed dial and clear up any junk from memory
Guest spacemonkey Posted April 28, 2003 Report Posted April 28, 2003 It might be a bit confusing, but remember that this forum is called development, the information posted here should be for developers rather than general phone users, and as such will often be a bit more technical and assume some previous knowledge. Palindrome, I'll throw together a little stand alone app for speed dial use tonight. Midnight, it's not too filthy, it's a legitimate call to the operating system and allows the OS to deal with closing the applications in the way it's designed to.
Guest The PocketTV Team Posted April 28, 2003 Report Posted April 28, 2003 If you want to close all background apps on the phone in order to make your game/movie player run faster try this: SHCloseApps (xxxxx); where xxxxx is how many bytes you reckon you need of memory. Ok, but this is not very nice to do that if you do not really need than much memory. Normally, well-behaved applications that do nothing and sit in the background do not use any CPU time, just memory. They do not slow down the system at all, they are just sitting there. Killing them will free memory but not make the system faster (unless the apps you are killing are not programmed properly). But it will have a negative effect, i.e. those apps that you kill will have to re-start , which makes them slow to come on the screen, and it is likely that those apps are some that you use frequently. So, doing what you suggest may have more negative effects on the performance of the phone than it has positive effects. If apps are well programmed, they should do nothing and just sit in the back, and this should only have positive effects, as long as the running app has enough memory to work. You can see that as a form of "caching", but instead of caching data, we are caching applications, processes. Remember, the Smartphone (and the Pocket PC) are not like desktop PC, they don't have virtual memory and a swap disk, so they don' get slugish the same way a PC gets slow when it starts to swap virtual memory on the disk because you are using more memory than the physical RAM available.
Guest spacemonkey Posted April 28, 2003 Report Posted April 28, 2003 PocketTV Team - I quite agree, you shouldn't do this, and also, programs in the background shouldn't slow down the phone. However, my experience so far is that programs in the background do slow down the phone, it's possibly just a few of them that cause most of the problem. There will always be some extra overhead with backgrounded apps as they do require some memory access and cpu cycles for the operating system to manage their presence. For most apps, this slowdown from background apps isn't significant, but for a few where they are pushing the phone to the maximum performance, such as gnuboy, killing these background tasks makes a noticable difference to application performance. For PocketMVP (the divx player) it makes a difference... I have been by hand loading task manager and killing apps before running gnuboy, to get acceptable performance, this provides a way of automating that. A better approach is probably the clearout app hooked up to a speed dial as has been suggested rather than including this in individual applications... Of course on future smartphones with faster cpus this whole situation may be less of an issue.
Guest jim80b Posted May 3, 2003 Report Posted May 3, 2003 sorry i think i am missing something... has anyone done this little stand alone prog... please post it
Guest Monolithix [MVP] Posted May 3, 2003 Report Posted May 3, 2003 No stand alone app, just letting developers who's apps need a lot of memory how to close all running programs before executing...
Guest awarner [MVP] Posted May 4, 2003 Report Posted May 4, 2003 Nice idea, it would be good it this could be bechmarked in some way Spacemonkey how much better for example does gnuboy run?
Guest spacemonkey Posted May 5, 2003 Report Posted May 5, 2003 I've done a stand alone little app killer. Check this thread: http://smartphone.modaco.com/viewtopic.php...p=209510#209510 As to how much better gnuboy runs? well, I always used taskmanager to kill stuff anyway, so for me, no better. I get approximately 25fps in most RPG style games on my phone (that's dragon warrior 1 & 2 at the moment) It really depends what you end up with in the background, but I've had situations where before killing I was getting 14fps and after killing back up to 25fps.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now