On Sun, Nov 23, 2008 at 06:06:54PM -0800, Dan Nicholson wrote: > Rather than compiling a new keymap every time XkbInitKeyboardDeviceStruct > is called, cache the previous keymap and reuse it if the rules have not been > changed. When XkbSetRulesDflts is called, the cached map is invalidated if > it differs from the previous default rules. > > The map is also invalidated if named components are supplied. This could be > fixed by caching Ktcsg from the previous run and comparing. > > Signed-off-by: Dan Nicholson <[EMAIL PROTECTED]> > --- > This takes Peter's suggestion and just copies the internal keymap structs > when there aren't any changes. It seems to work in my testing and for all > the cases I can think of. > > I plan to do some actual profiling to see what the effects are, but it > seems like a win to not just blindly fork xkbcomp unless necessary.
Shiny. This might have a small impact on startup time, too. Untested, but looks okay (was concerned that it might have still directly assigned rather than copied, but all good). Signed-off-but-not-tested-by: Daniel Stone <[EMAIL PROTECTED]> I don't think caching KcCGST is really worth it. Cheers, Daniel
signature.asc
Description: Digital signature
_______________________________________________ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg