[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Compose table cache for faster X11 application starts
From:       Matthias Hopf <mhopf () suse ! de>
Date:       2005-04-22 16:52:37
Message-ID: 20050422165237.GA3834 () suse ! de
[Download RAW message or body]

Hi all,

as talked about on the Xorg developer conference, I implemented a
compose cache mechanism for XIM, based on the early implementation by
Lubos Lunak (llunak@suse.de). We should still think about replacing XIM
in the long term, but these patches help for application startups in the
short term.

All information and all patches have been uploaded to a bugzilla entry:

https://bugs.freedesktop.org/show_bug.cgi?id=3104


The compose cache accelerates program startup times and memory
consumption considerably, especially for UTF8 locales. If a cache file
is found during the startup of an application, the according cache is
mmap()ed.

Speedup is approx. 40-200ms decreased startup time for every X
application, depending on your processor.  Approx. 240KB memory is saved
per application.  This is for UTF8 locales, differences are much lower
for non-UTF8 locales, as well as for home-grown compose tables.

The patches also implement a small (single entry) cache to
_XlcLocaleDirName to deal with repeated calls.

Cache files are searched in a global cache dir (read-only) and in the
.compose-cache diretory of the user's home. If this directory does not
exist, it is *not* created, effectively disabling the possibility of
creating cache files.

The whole thing consists of three patches, one for flattening out the
internal database, one for the cache, and one for a helper program.

The patches have been applied within SuSE Linux 9.3 (already shipping),
and global cache files are shipped for all UTF8 locales as well.  So far
no problems.


I'd like to see a discussion whether this can be included upstream, and
what you gyus basically think about the patches.


Thanks

Matthias

-- 
Matthias Hopf <mhopf@suse.de>       __        __   __
Maxfeldstr. 5 / 90409 Nuernberg    (_   | |  (_   |__         mat@mshopf.de
Phone +49-911-74053-715            __)  |_|  __)  |__  labs   www.mshopf.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic