Page 2 of 2

Re: autocomplete Trie

Posted: Tue Jan 21, 2020 4:22 am
by idle
switched to utf8 and converted to array based so it can be saved and restored from file or memory and sorted the Enum out

pros
save and restore
same memory use on x86 amd x64
more cache friendly
utf8 shorter strings
nibbles smaller alphabet
cons
may create page faults reallocating, need to create trie with enough space initially
twice the number of nodes to access a token

Re: autocomplete Trie

Posted: Fri Jan 24, 2020 12:32 am
by idle
mashed it into a ScintillaGadget using Scintillas Autocomplete, I don't see any issues speed wise.
Tested on x64 linux and windows xp vm

It still has a slight problem with the positioning if you return at end of line the list will appear at the wrong location as I'm missing to trap a message
Space cancels the list, Return enters the item
I still have to abstract it a little to manage contexts, that can be done in the trie itself but I need to study the ide code a little more before deciding how to facilitate it.

Can you please test and report back how it performs on your platform.

Edit
fixed bug in enum position with the change to support Unicode and UTF8 keys

Re: autocomplete Trie

Posted: Sat Jan 25, 2020 7:13 am
by idle
Fixed bug in enum position with the change to support both Unicode and UTF8 keys.