Author Topic: Preloading?  (Read 2479 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Preloading?
« on: February 01, 2007, 11:18:37 am »
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.

The tasks applet Meanie put into pdaXii13 contains code which is able to "remote-control" windows, i.e. minimize, maximize, close etc.
I think this is done using libwnck.

So it should be possible to write a program using this library, which starts up a (configurable) set of programs when X is started and minimizes them instantly.

Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).

And additionally, for the keyboard addicts, we would need a way to bring them to foreground using the application keys (calendar, address...), which should also be no problem using a custom-made program which uses these above mentioned functions from libwnck.

Meanie, would you be so kind to reveal the sources of your version of mb-applet-tasks? I think this is the key to preloading in pdaXrom.

I have always looked for a way to bring windows to the front using the application keys. libwnck should be able to make this possible.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Preloading?
« Reply #1 on: February 01, 2007, 06:53:45 pm »
Quote
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.

The tasks applet Meanie put into pdaXii13 contains code which is able to "remote-control" windows, i.e. minimize, maximize, close etc.
I think this is done using libwnck.

So it should be possible to write a program using this library, which starts up a (configurable) set of programs when X is started and minimizes them instantly.

Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).

And additionally, for the keyboard addicts, we would need a way to bring them to foreground using the application keys (calendar, address...), which should also be no problem using a custom-made program which uses these above mentioned functions from libwnck.

Meanie, would you be so kind to reveal the sources of your version of mb-applet-tasks? I think this is the key to preloading in pdaXrom.

I have always looked for a way to bring windows to the front using the application keys. libwnck should be able to make this possible.

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153222\"][{POST_SNAPBACK}][/a][/div]

actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Preloading?
« Reply #2 on: February 06, 2007, 05:51:22 am »
Quote
actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153254\"][{POST_SNAPBACK}][/a][/div]

Wow, great, I didn't realize there is an autostart feature in the new tasks applet!

Great and simple idea.
However, I don't know how to use xresizewindow e.g. on windows like these of KO/PI which change their titles depending on the title of the next appointment etc...
It seems xresizewidow needs the exact window title in order to handle the window.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Preloading?
« Reply #3 on: February 06, 2007, 05:58:20 am »
Quote
Quote
actually, I didn't change the task applet much besides giving it a nicer looking icon and adding the autoexec feature. so if it finds autoexec under .matchbox it will run that script. this is actually useful for preloading because the task applet is started after matchbox and openbox (ie the window manager) is started.

so you could place apps into autoexec and run xresizewindow or something similar to make them smaller, bigger or minimised...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153254\"][{POST_SNAPBACK}][/a][/div]

Wow, great, I didn't realize there is an autostart feature in the new tasks applet!

Great and simple idea.
However, I don't know how to use xresizewindow e.g. on windows like these of KO/PI which change their titles depending on the title of the next appointment etc...
It seems xresizewidow needs the exact window title in order to handle the window.

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153306\"][{POST_SNAPBACK}][/a][/div]

if you look at my updated rotate script (x11scr), then you will find an example of how I used xwininfo to get the name of the window to pass to xresizewindow... probably would be faster to write the whole thing in a single app instead of piping several cli apps but I am too lazy to learn the required api calls to make a dedicated app for that ...
« Last Edit: February 06, 2007, 05:59:28 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Preloading?
« Reply #4 on: February 06, 2007, 06:04:48 am »
btw, if you want to ensure only one instance of an app is ever run, then you can add SingleInstance in its .desktop file and use the mb launcher to start it instead of starting the app directly...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Preloading?
« Reply #5 on: February 06, 2007, 08:10:17 am »
Quote
btw, if you want to ensure only one instance of an app is ever run, then you can add SingleInstance in its .desktop file and use the mb launcher to start it instead of starting the app directly...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153308\"][{POST_SNAPBACK}][/a][/div]

Hi Meanie,

this would indeed be great if this worked, but i tried this several times, and I couldn't make that work.

No matter if I start that SingleInstance=true .desktop file using

mb-applet-launcher -s --desktop ..../xy.desktop

or without the direct start

mb-applet-launcher --desktop ..../xy.desktop

it always starts a second instance instead of bringing the already open instance to front.

Am I doing something wrong?
Did you make it work somehow?

I took the normal kopi.desktop file (of KO/PI) and added the SingleInstance=True line.

Thanks
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Drake01

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Preloading?
« Reply #6 on: February 06, 2007, 07:56:13 pm »
Quote
Hi guys,

the recent discussion about prelinking brought me to these thoughts:

With a kind of a startup script in X one could indeed "pre-load" often-used apps which should be quickly at hand, such as KA/PI, KO/PI, Zbedic etc.
...
Using the task applet, they are always quickly brought to the foreground (without cycling through all open windows with Alt-Tab).
...
I like this idea and I would love to have a faster way of starting apps.  Part of the reason I settled on the GPE* set of PIM apps is because they are quicker to load.  I came to the C1000 from a Palm-based PDA, which had relatively quick load times for the PIM apps.

Now that I've gotten that disclaimer out of the way...   How well would this work with the limited memory on a Z?  If there are a few of the most frequently used apps already eating up memory, what happens if I want to run another "full-sized" (i.e. large) app?  Will I run out of memory?  Will I need to have a swap partition enabled at all times?  I understand that running swap will reduce general system performance because of I/O.

I'm certainly not trying to say that this is a bad idea.  It just seems that memory utilization may be an issue that needs to be considered.  I remember KA/PI & KO/PI take a while to load, and I'm assuming a large part of that is due to the memory footprint.  Since I'm not currently using these apps, would you be able to post how much memory each consumes when loaded?
Device: SL-C3200 running pdaXii13v2 build 5.5.0
Networking: Symbol Spectrum24 WLAN card; Kingston CIO10T CF NIC
Storage: 4GB Transcend 150x SD; 16GB Transcend 133x CF; 4GB Seagate CF HDD; 4GB Patriot SD
HID: Logitech V450 Laser Mouse; generic silicone USB keyboard; 2 generic optical mice; stock plastic stylus
GPS: generic "UT-41" USB GPS Receiver
Case: neoprene case from my old Palm foldable keyboard