Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Monaten, 3 Wochen
Letzter Beitrag:
vor 2 Monaten, 3 Wochen
Beteiligte Autoren:
ChristoK!, Fabrice Harari, Ned!

fLoadText 32-bit bug - need work-around

Startbeitrag von ChristoK! am 24.10.2017 15: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???



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

von Fabrice Harari - am 24.10.2017 15:53
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

von ChristoK! - am 24.10.2017 16:37

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

von Fabrice Harari - am 24.10.2017 21:02
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.


von Ned! - am 25.10.2017 08:37
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.