PDA

View Full Version : Text fields, pasting large amounts of text, FGU very sluggish, FGC not.



celestian
January 28th, 2020, 03:45
So one of the things I've been working on is a bulk import tool. Currently the text is 1900 ish lines long.

FGC, lets me paste the text into the text field and becomes responsive after 2-5 seconds.

FGU I paste the text into the text field and it hangs, for an extraordinarily long time (like 30+ minutes).

There is an upside to FGU tho, once it DOES become responsive again I can press the "IMPORT" button and it will process all 1900 entries. In FGC it dies because of memory issues (expected)... FGC seems to be ok with 100-200 or so entries at a time.

mattekure
January 28th, 2020, 16:41
Question for you, does the process you are trying to achieve require that data be pasted into a text field? Is there any editing being done on the data after pasting it into the text field, but before the IMPORT button is pressed? What I use for the CSV parser is a simple local sCB = Interface.clipboardGetText(); which returns the entire contents of the clipboard into the sCB variable that can be processed. this takes almost no time at all, I've been able to do the text import on CSV files well over 20,000 lines long in less than a second.

celestian
January 28th, 2020, 18:25
Question for you, does the process you are trying to achieve require that data be pasted into a text field? Is there any editing being done on the data after pasting it into the text field, but before the IMPORT button is pressed? What I use for the CSV parser is a simple local sCB = Interface.clipboardGetText(); which returns the entire contents of the clipboard into the sCB variable that can be processed. this takes almost no time at all, I've been able to do the text import on CSV files well over 20,000 lines long in less than a second.

I am not pulling out of the clipboard no. They paste the data into a text field (stringu template/control to be exact). Once it's there they can review and then click import. This ensures they actually have what they want in the field and not some incorrectly copied data.

The problem is FGU behaving differently than FGC.