|
| fLoadText 32-bit bug - need work-around |
| Iniciado por guest, 24,oct. 2017 17:44 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 24,octubre 2017 - 17:44 |
Ok gang...
I have a text file that is 279Mb in size (it is all nicely formatted json) that I need to get into my database.
Creating my app as a 64-bit and things like fRead and fLoadText work perfectly... but ya gotta screw around getting things like NativePostgres to work..
So I've gone the create a 32-bit app. All the NativePostgres works "off-the-shelf".. but... now I can't get the data out of the text file (I'm told my 64Gb RAM machine is "Out of Memory")...
I do know that this "bug" was pointed out to PCSoft in version 17, but I can't find anywhere that has a solve for it... so...
anyone have any idea how to get data out of a large file using 32-bit WX app??? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,octubre 2017 - 17:53 |
Hi
2 possible work around:
1. create a separate exe in 64 bits for the extraction process (write temporarily in a file format that you can process later in your 32 bits exe). Your main program calls this one, then works on the resulting temporary file to do the 32 bits postgress thingy
2. As it's not the floadtext creating the problem (I have loaded bigger files than that in a 32 bit windev exe), find the real culprit (I'm guessing the JSON functions), and extract the data with the regular string functions instead of the JSON ones.
Of course, you could simply use HFSQL instead 
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,octubre 2017 - 18:37 |
I would like not to have to create separate programs (kinda defeats the purpose)
and it is the file size as I did try with other types of formatted text and fRead (and it's variants) all give the same "Out of Memory" error in 32-bit |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,octubre 2017 - 23:02 |
Hi
I don't see how a workaround can defeat the purpose of anything... it's a way to work around a problem, and it does.
As for the size problem, I'm pretty sure you code is faulty, because there is NO REASON why you couldn't load in memory a 300 MB file in 32 bits. I've been doing that for years without any problem. But if you don't give us the code and the error message, we can't help
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 25,octubre 2017 - 10:37 |
Hi Christo
Are you using a progress bar during your process for reading the file?
I had a problem in the past with a 32bit exe loading large files which went away after removing the progress bar - could have been a coinciedence but worth a try.
Thanks Ned |
| |
| |
| | | |
|
| | | | |
| | |
|