[PATCH] Cache xkbcomp output

Daniel Stone daniel at fooishbar.org
Fri Jul 20 02:54:23 PDT 2012


On 20 July 2012 06:05, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On Jul 19, 2012 3:38 PM, "Daniel Stone" <daniel at fooishbar.org> wrote:
>> A more sensible interim
>> strategy (IMO) would be to always fork xkbcomp once during startup,
>> preserve the resulting XkbDescRec, then hand that back every time
>> someone asks for the same keymap, which is pretty much all the time.
>> It's really not a lot of code either.
> Don't we already do this? I wrote that patch a couple years ago. You still
> have the initial xkbcomp fork that's slow on a cold disk, but the in memory
> keymap is pretty much instant for subsequent devices. I'm on my phone and
> can't check the archives right now, though.

Good point, I was looking in the wrong place.

So we do that in xkbInit.c by comparing the RMLVO, but I think we
could see greater wins from caching the KcCGST instead and doing it in
XkbDDXLoadKeymapByNames.  That way we cache it for clients which
repeatedly ask us to build the keymap too.


More information about the xorg-devel mailing list