[PATCH] Improving _XimParseStringFile

Cedric BAIL cedric.bail at free.fr
Thu Apr 9 02:21:11 PDT 2009


Hi,

  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. 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.

Regards,
-- 
Cedric BAIL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libx11-ximcp.diff
Type: text/x-diff
Size: 9863 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090409/d8c307d9/attachment.diff 


More information about the xorg-devel mailing list