Re: Look at what the panel does now before discussing what it should do!!

Eric Kidd <> writes:
>Two possible solutions might be:
> * Cache the icons even after the menus are purged. This might take up
>   considerably less RAM than caching the entire menus.
> * Display the menu with no icons when necessary, and add the icons into
>   the open menu as they get loaded from disk. This might be a bit tricky
>   to do--you'd probably have to use a transparent icon-sized graphic and
>   change it while the menu is open. Is this possible with Gtk+?

A third solution is this:  mmap a "private swap" file, and store the
icon/menu data there.  That way, if you want to save RAM, you can unmap
the file, and when you want to reload the data, you don't have to reparse,
reformat, re-anything; the VM just pages it back in.

Can't get any more efficient than that.

Furthermore you can use the "unlink on open" trick to make sure the file
is inaccessible to tampering in the filesystem while the panel is running,
and that the file will be automatically deleted when the panel terminates for
whatever reason.

	-Michael Robinson

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]