[ icewm-Feature Requests-1052961 ] Preload the menu.
Brought to you by:
captnmark
From: SourceForge.net <no...@so...> - 2005-12-10 11:36:20
|
Feature Requests item #1052961, was opened at 2004-10-24 00:32 Message generated for change (Comment added) made by jerome_31 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350031&aid=1052961&group_id=31 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: taskbar2 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Martin C (martinc_sf) Assigned to: Nobody/Anonymous (nobody) Summary: Preload the menu. Initial Comment: It would be nice to add the posibility of preload the menu at start. In that way, the first click on the menu is gonna be very fast, without having to load all the icons. ---------------------------------------------------------------------- Comment By: Jerome (jerome_31) Date: 2005-12-10 12:36 Message: Logged In: YES user_id=1401279 More generally, it could be good to lasily preload the files which are assumed to be loaded after the startup. I made it for me. But maybe it could be added to the default user startup file. ~/.icewm/startup: --- #!/bin/sh (nice -n 40 ~/.icewm/preload > /dev/null) & --- ~/.icewm/preload: --- #!/bin/sh # preload lazily in cache some files # which are assumed to be read # after startup is_enough_memory() { ((`grep -m 1 -i MemFree /proc/meminfo|awk '{print $2}'` > 8192)) } load_in_cache() { echo load $1 head --bytes 1m $1 > /dev/null } typeset -i preloading_stopped=0 # target files of the toolbar for i in `grep '^prog' ~/.icewm/toolbar|awk '{print $4}'`; do { sleep .5 if is_enough_memory; then { load_in_cache `which $i` } else { preloading_stopped=1 break } fi } done # images of the menu if !((preloading_stopped)); then { sleep .5 if is_enough_memory; then { for i in `grep '^menu' ~/.icewm/menu|sed 's,^menu \.*\,,'|sed 's, {$,,'|sort|uniq`; do { load_in_cache $i } done } else { preloading_stopped=1 } fi } fi if ((preloading_stopped)); then { echo 'not enough free memory : preloading stopped' } fi --- ---------------------------------------------------------------------- Comment By: Adam Pribyl (covexx) Date: 2004-10-24 10:58 Message: Logged In: YES user_id=607018 Dupe RFE #695779 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350031&aid=1052961&group_id=31 |