Three possible approaches:
At ~£70/$100, this is quick, simple and very cheap.
Datasets only ever seem to get bigger, so this would somewhat future proof you.
Depending upon your data, there may be less memory intensive ways of building your indexes.
A few (real or realistic) examples of the data showing the datatype (string/real/integer) of the keys and the size and nature of the values, would me far more useful than your script which I think you've adequately described.
Should result in an equally fast (or possibly faster) processing; but requires 'cooperative data', so may not be applicable; and requires some rework of your script, though the basic structure would remain the same.
Slow. Quite a lot of work.
A fourth approach would be to use a database, but I'll let others tell you about that.
In reply to Re: How to reslove this memory issue
by BrowserUk
in thread How to reslove this memory issue
by Ankur_kuls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |