Optimising dictionary load (in Javascript)

I have a TextAsset, `dictionary`, which is a file containing a word per line, representing a scrabble-style word set. Currently I am iterating over it, like so:

var words = dictionary.text.Split("
"[0]);
validWords = new Hashtable();
for (word in words) {
    validWords[word] = true;
}

But the file is around 3MB and therefore takes several minutes to load. Ideally I would like to be able to store the dictionary contents in a lightweight binary format that could be loaded "in place". Is this possible at all?

Does anyone have any other suggestions?

I'm not sure if this will be relevant to your project but have you tried splitting the word file into a seperate file for each letter of the alphabet. i.e A.txt, B.txt etc.

Then if you are randomly getting a word, first pick a random letter from the alphabet. Then open that specific word file.

Alternatively if that doesn't work for you, have you looked into using a database engine of some sort?

Just to focus on one aspect, using Dictionary would be rather faster (and more typesafe) than Hashtable:

var words = dictionary.text.Split("
"[0]);
validWords = new Dictionary.<String, boolean>();
for (word in words) {
    validWords[word] = true;
}