cfinke / Typo.js

A client-side JavaScript spellchecker that uses Hunspell-style dictionaries.
Other
510 stars 111 forks source link

suggest() uses web workers #23

Closed mcasperson closed 6 years ago

mcasperson commented 11 years ago

I've rewritten the suggest() function to take advantage of web workers. This significantly reduces the time it takes to get suggestions for words more than about 5 characters long.

I updated the English tests, but because of the way the web workers split up their processing, deepEqual() sometimes doesn't work because the arrays can be constructed in a different order. But the theory is sound :).

cfinke commented 11 years ago

Just making a note that I'm looking at this. deepEqual() will have to work entirely before I merge it in, but I like the general idea.

cfinke commented 8 years ago

Some recent changes improve performance by as much as 10x; the improvement from web workers might now be unnecessary.