keysym: fast path for case sensitive xkb_keysym_from_name
authorRan Benita <ran@unusedvar.com>
Sun, 28 Mar 2021 12:51:01 +0000 (15:51 +0300)
committerRan Benita <ran@unusedvar.com>
Sun, 28 Mar 2021 13:11:36 +0000 (16:11 +0300)
commit7d84809fdccbb5898d0838849ec7c321410182d5
tree76b6db4cdb32caf1918738bee31e1797fc123bd9
parent3b506497bf9033124ce71150719325c6f2ddcf75
keysym: fast path for case sensitive xkb_keysym_from_name

xkb_keysym_from_name() is called a lot in Compose file parsing. The
lower case handling slows things down a lot (particularly given we can't
use the optimized strcasecmp() due to locale issues). So add separate
handling for the non-case-sensitive case which is used by Compose.

To do this we need to add another version of the ks_tables table. This
adds ~20kb to the shared library binary. We can probably do something
better here but I think it's fine.

Signed-off-by: Ran Benita <ran@unusedvar.com>
scripts/makekeys
src/keysym.c
src/ks_tables.h