Open dennisss opened 6 years ago
I'm fully in support of this idea. A few questions first though:
Is it fully backwards compatible? If this change were merged and every single person using Typo started using it, would they have to change anything?
Are you able to split any changes from "Other things fixed" into their own pull requests?
Thanks,
Chris
Why?
Wanted a way to avoid the browser frozen for half a second or more while loading the dictionary
How
dictionaryTable
variable for any generic key-value store interfacerequire()
environments due to some dependencies, but otherwise all other functionality should still work as beforeLimitations
Other things fixed:
Benchmarks
TLDR: Loading from the precomputed dictionary table is magnitudes better in terms of memory usage and load time. But, checking and suggesting operations are much slower. From my tests, more performance could probably be obtained by optimizing the new datastructure, but so far it has been sufficient for interactive applications.
Memory usage taken manually by idling the following script:
Overall node process memory usage:
Using loadPrecomputed: 14.8Mb Using load: 59.9Mb
Speed
Generated by the
bin/benchmark.js
script.