K
kubek
Hi.
I am dealing with a problem - in my software I need to check whether
written by user string or set of strings is spelled correctly. I have a
complete dictionary (Polish, text file of size of over 30mb), in which
I can check whether entered string is correct (if it exists in file).
Problem is that I can't load such a big file into memory (over 2,6
million lines). I have also modified the maximum heap size (java
-Xms16M -Xmx256M myAppl) and it worked, but...I have checked in
TaskManager and observed, that my application takes over 180mb of
memory - which in my opinion is quite much
Do You have any ideas how to change my text file (dictionary) - I don't
know, for example into binary file (if it makes sense), how to compress
or represent all 2,6 million strings in other way, that they all can be
loaded into memory in reasonable time and allocating reasonable amount
of memory?
If binary file is useful - how to "convert" my text file into it?
What is the best way to store it in memory - ArrayList, Collection or
something else?
Please help me, because it's urgent.
I need some ideas, key words, links where I can look for solution, or
any other help will be helpful
Thanks in advance
Chris
I am dealing with a problem - in my software I need to check whether
written by user string or set of strings is spelled correctly. I have a
complete dictionary (Polish, text file of size of over 30mb), in which
I can check whether entered string is correct (if it exists in file).
Problem is that I can't load such a big file into memory (over 2,6
million lines). I have also modified the maximum heap size (java
-Xms16M -Xmx256M myAppl) and it worked, but...I have checked in
TaskManager and observed, that my application takes over 180mb of
memory - which in my opinion is quite much
Do You have any ideas how to change my text file (dictionary) - I don't
know, for example into binary file (if it makes sense), how to compress
or represent all 2,6 million strings in other way, that they all can be
loaded into memory in reasonable time and allocating reasonable amount
of memory?
If binary file is useful - how to "convert" my text file into it?
What is the best way to store it in memory - ArrayList, Collection or
something else?
Please help me, because it's urgent.
I need some ideas, key words, links where I can look for solution, or
any other help will be helpful
Thanks in advance
Chris