parse the file with paparse library to the Dictionary
cache all the Dictionary to module's closure variable
search for the word
if it already has cached dictionary it simply searched in it.
So we could see the following disadvantages:
1) parsing, fetching data from the whole amount of data on the client side
2) we need to store the all definitions inside RAM
I suggest to look for a new workflow of retrieving this data - from structured database on the server - for example the easiest way - SQLite. It could be used on the server and for the local use.
Current workflow to get lexicons:
paparse
library to the Dictionaryif it already has cached dictionary it simply searched in it. So we could see the following disadvantages:
1) parsing, fetching data from the whole amount of data on the client side 2) we need to store the all definitions inside RAM
I suggest to look for a new workflow of retrieving this data - from structured database on the server - for example the easiest way - SQLite. It could be used on the server and for the local use.