Active Topics

 


Reply
Thread Tools
Posts: 263 | Thanked: 108 times | Joined on May 2008
#1
Hi everybody.
Is there anyone here with a good knowledge about Maemo wich can make certain apps comes "pre-loaded" or closing making it sleep and vanishes from dashboard BUT stilll running (when you load it again by apps menu, it'll show again, like the MicroB, for example)?
It would be great to see quicker startup on some selectable apps as my RAM is always at 40%-50%, it think we could use it more.
Also, I see a lot of delay using the internal/external memory, it seems that most of the device lag comes from I/O, wich I suppose that doesn't happen in RAM's I/O.

Well, just an idea, lets discuss.
 
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#2
microb launches fast because it preloaded. IIRC You can unload it with browser switcher app.

And about launch speed. Sadly they seem all bit slow (what is slow?, well to me itīs app that doesn't start in 1-2s to point where you can interact with it) to start. At least currently apps that have been made with python.

I doubt that you gain any speed increase from unloading microb. Best thing probably is to keep those programs running that you want to access fast.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#3
Won't be too difficult - just hide the main window on a destroy event (to talk in GTK+ terms) and re-show it on a D-Bus signal (i.e. when it's activated from the application manager). The only problem is that the app has to be coded to not cause unnecessary wake-ups when running in "hidden" mode and it could lead to a problem with memory consumption, as "hidden" apps still reside in memory, even if they are swapped out to swapspace.

MeeGo Touch will provide something like this built-in:

http://apidocs.meego.com/mtf/namespa...f36522ced5ffff

(it's called "prestart mode" or "lazy shutdown" there)

You can set it on MApplication:

http://apidocs.meego.com/mtf/class_m...4c965367ca7c77

AFAIK the "prestart" mode (loading before first use) is limited to built-in apps, but lazy shutdown (keeping in memory after first use) could be possible on MeeGo.

For Maemo, it's possible - it's just a matter of where it makes sense and then of implementing it. Here's how you would do it:
  • Connect to the destroy event of your main window - return TRUE and hide the main window
  • Make a D-Bus service for your application, add a "show_gui" method or something that simply shows the main window when called
  • Make the launcher script of your app call "show_gui" if the app is already running, otherwise launch the app normally

Last edited by thp; 2010-08-23 at 12:07.
 

The Following 4 Users Say Thank You to thp For This Useful Post:
Posts: 263 | Thanked: 108 times | Joined on May 2008
#4
Originally Posted by slender View Post
microb launches fast because it preloaded. IIRC You can unload it with browser switcher app.

And about launch speed. Sadly they seem all bit slow (what is slow?, well to me itīs app that doesn't start in 1-2s to point where you can interact with it) to start. At least currently apps that have been made with python.

I doubt that you gain any speed increase from unloading microb. Best thing probably is to keep those programs running that you want to access fast.
I want to preload other apps like microb, not kill microb... I want to preload and not kill 100% other apps.
 
Posts: 263 | Thanked: 108 times | Joined on May 2008
#5
Originally Posted by thp View Post
Won't be too difficult - just hide the main window on a destroy event (to talk in GTK+ terms) and re-show it on a D-Bus signal (i.e. when it's activated from the application manager). The only problem is that the app has to be coded to not cause unnecessary wake-ups when running in "hidden" mode and it could lead to a problem with memory consumption, as "hidden" apps still reside in memory, even if they are swapped out to swapspace.

MeeGo Touch will provide something like this built-in:

http://apidocs.meego.com/mtf/namespa...f36522ced5ffff

(it's called "prestart mode" or "lazy shutdown" there)

You can set it on MApplication:

http://apidocs.meego.com/mtf/class_m...4c965367ca7c77

AFAIK the "prestart" mode (loading before first use) is limited to built-in apps, but lazy shutdown (keeping in memory after first use) could be possible on MeeGo.

For Maemo, it's possible - it's just a matter of where it makes sense and then of implementing it. Here's how you would do it:
  • Connect to the destroy event of your main window - return TRUE and hide the main window
  • Make a D-Bus service for your application, add a "show_gui" method or something that simply shows the main window when called
  • Make the launcher script of your app call "show_gui" if the app is already running, otherwise launch the app normally
Thanks for the tips, but I don't have the knowledge for doing that

I'll try to explain it better, since I haven't seen much interest:

- Most of the time, N900's RAMs is at 50%, this means: we can preload more apps on it and have a fast user experience launching apps;
- Most of the time, when using N900's ROM memory (the 32gb part) it slows down the system, and it's not about processing power, it's about I/O. This means: the less you read from ROM, the faster you get it (wich is true always...).
- Most of the time, I tend to close apps because I don't want them taking space at dashboard (I loose the menu shortcut), but I tend to relaunch it after a certain time.

So my idea is to have a app to control wich apps will "prelaunch" at startup and got "hidden" from dashboard... you launch it, use it, it's on dash, once you hit the close, it'll get back to RAM, hide from dashboard.
Kinda default browser.
 
Posts: 263 | Thanked: 108 times | Joined on May 2008
#6
uhm, really no one? everyone is happy with wasting RAM?
 
fnordianslip's Avatar
Posts: 670 | Thanked: 359 times | Joined on May 2007
#7
RAM isn't actually wasted though. Its being used for disk caching, so it may very well be caching the binaries of the apps you want anyway, or something more important.
__________________
Class .. : Lame hacker & beardy boffin
Humour . : [#######---] Alignment: Apathetic anarchist
Patience : [####------] Weapon(s): My cat, my code.
Agro ... : |#---------] Relic(s) : N900, MacBookPro, NSLU2, N800, SheevaPlug, Eee-901, Core2-Quad, PS3
"In theory, theory and practice are the same. In practice, they're not."
--
Beware of extras-devel.
 
Posts: 263 | Thanked: 108 times | Joined on May 2008
#8
Originally Posted by fnordianslip View Post
RAM isn't actually wasted though. Its being used for disk caching, so it may very well be caching the binaries of the apps you want anyway, or something more important.
The point is that 60% of the time it is around 60-70%, so I think there's room for something more.. also, there's a lot of swap space too, wich I know its not RAM...
 
Posts: 263 | Thanked: 108 times | Joined on May 2008
#9
Guys, i've got a little solution for my problem:
http://talk.maemo.org/showthread.php...ght=swappiness

Changing swappiness to something around 0-20 makes my RAM most of the time at 70%-90%, wich is cool.
Also, it looses less time doing swap...

I have stopped the tracker indexing too:
http://talk.maemo.org/showthread.php?t=61440

My device is responding better and the battery improved dramatically!
 
Posts: 388 | Thanked: 842 times | Joined on Sep 2009 @ Finland
#10
Originally Posted by ivnvir View Post
The point is that 60% of the time it is around 60-70%, so I think there's room for something more.. also, there's a lot of swap space too, wich I know its not RAM...
Your figures of free ram come from conky, right? Well forget that, it doesn't show the actual physical RAM utilization.

Try "free" or "cat /proc/meminfo"
http://unixfoo.blogspot.com/2008/02/...ocmeminfo.html

Originally Posted by ivnvir View Post
My device is responding better and the battery improved dramatically!
I honestly couldn't tell the difference based just on the "feeling". Where are your benchmark results?

Last edited by hqh; 2010-09-02 at 17:08.
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:07.