Large amount of data. Suggestions anyone?
Posted: Tue Oct 18, 2022 2:15 pm
Hi guys and dolls,
I am looking for coding suggestions concerning a certain case.
- a textfile (UTF-8)
- filesize is 426MB
- 11.183.522 lines
- each line contains 10-35 characters
- the file is static. This means it is not changing over time.
I want to find a certain string in this textfile. Using Readstring() takes a lot of time to find the string. If I want to find more strings, things take an even larger amount of time as a total .The number of strings to be found will get more in the future and at this moment there are already over 2.000.
So far I have tried several codes, including putting that large file into an array to shorten looptime. This seem to work but when I approach the array, I get a memory error.
No code has worked so far. It gets all sorts of memory errors (not at the same point) or, if I create an exe, crashing programs. Also the debugger tells me the program quits unexpectedly (I dind't expect it eighter
). This also happens at different stages.
It seems as if the Windows memorymanager cannot handle this large amount of data???
Any suggestions anyone? Don't ask me what the program is for, it doesn't matter. Thanks in advance for your trouble.
MrCor
I am looking for coding suggestions concerning a certain case.
- a textfile (UTF-8)
- filesize is 426MB
- 11.183.522 lines
- each line contains 10-35 characters
- the file is static. This means it is not changing over time.
I want to find a certain string in this textfile. Using Readstring() takes a lot of time to find the string. If I want to find more strings, things take an even larger amount of time as a total .The number of strings to be found will get more in the future and at this moment there are already over 2.000.
So far I have tried several codes, including putting that large file into an array to shorten looptime. This seem to work but when I approach the array, I get a memory error.
No code has worked so far. It gets all sorts of memory errors (not at the same point) or, if I create an exe, crashing programs. Also the debugger tells me the program quits unexpectedly (I dind't expect it eighter

It seems as if the Windows memorymanager cannot handle this large amount of data???
Any suggestions anyone? Don't ask me what the program is for, it doesn't matter. Thanks in advance for your trouble.
MrCor