[PATCH] Improving _XimParseStringFile
Alan Coopersmith
Alan.Coopersmith at Sun.COM
Thu Apr 9 08:39:28 PDT 2009
Cedric BAIL wrote:
> I am a developper of the Enlightenment project, and during my work
> on optimising it, I did find that _XimParseStringFile was accounting
> for more than 30% of the time needed to get a window to show (under
> valgrind). I am using an Ubuntu Intrepid and it provide a 630KB
> "/usr/share/X11/locale/en_US.UTF-8/Compose". So it take a lot of time
> to read and parse. I did write a small patch, attached, that use mmap
> to read the file, this make _XimParseStringFile only account for 14%
> of the time, a little bit better.
mmap()'ing sounds like a fine idea, but I wonder if we need any #ifdef's
or configure checks for it for platforms like Cygwin, or if it's safe to
use on all.
> I think that if it's a normal
> behaviour to provide a 630KB file to parse (and it sounds like it is
> as the last size from libX11 git is around 670KB), changing this file
> to precompiled binary file format would be a better patch, sadly I
> don't have the needed time to write it right now.
I thought that's what was done by the mkcomposecache changes that SuSE
contributed a few years ago, but I don't think many people updated their
packages to build compose caches.
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
More information about the xorg-devel
mailing list