Created an attachment (id=2509)
Pointerless compose data structure patch
This patch redefines the compose data structures to use indices instead of
pointers. This is necessary to be able to mmap() the internal data
structures instead of parsing the compose table. Memory requirements are a
bit higher than before (I cannot realloc() for every single binding, so I
multiply by 1.5 each time space runs out), but performance is equivalent.
Tested this patch with all locales and input methods known to me and finally
works with SCIM again as well. Cache files are endian-safe and
typesize-safe (both encoded into filenames) and versioned.
There are a couple of issues to be thought about, though:
- I'm not exactly sure about the differences between INT32 and BITS32 types.
I chose these types for creating fixed sized structures.
- I defined the type of modifiers in the structure to be BITS32. It was just
'unsigned' before. Yes, no int or anything else.
- How much memory should I allocate in the very beginning? I chose numbers
so that the 'C' locale bindings just fit nicely into memory.
- I have *not* tested the new XOpenFileMode function that is needed for
Windows only (_XOpenFileMode) due to lack of an according development
environment.
- Memory that has been allocated during the creation of the structure is not
freed again. This could happen, when the Compose files contain errors or
overwrites already defined keysyms.
- The Thai imput method is inherrently broken, and we should think about
dropping it altogether.
Created an attachment (id=2509)
Pointerless compose data structure patch
This patch redefines the compose data structures to use indices instead of
pointers. This is necessary to be able to mmap() the internal data
structures instead of parsing the compose table. Memory requirements are a
bit higher than before (I cannot realloc() for every single binding, so I
multiply by 1.5 each time space runs out), but performance is equivalent.
Tested this patch with all locales and input methods known to me and finally
works with SCIM again as well. Cache files are endian-safe and
typesize-safe (both encoded into filenames) and versioned.
There are a couple of issues to be thought about, though:
- I'm not exactly sure about the differences between INT32 and BITS32 types.
I chose these types for creating fixed sized structures.
- I defined the type of modifiers in the structure to be BITS32. It was just
'unsigned' before. Yes, no int or anything else.
- How much memory should I allocate in the very beginning? I chose numbers
so that the 'C' locale bindings just fit nicely into memory.
- I have *not* tested the new XOpenFileMode function that is needed for
Windows only (_XOpenFileMode) due to lack of an according development
environment.
- Memory that has been allocated during the creation of the structure is not
freed again. This could happen, when the Compose files contain errors or
overwrites already defined keysyms.
- The Thai imput method is inherrently broken, and we should think about
dropping it altogether.