Hi Isomorphic,
I have a problem with my batch uploader. I tried to reproduce in the EE Online Showcase, but was not able to do so.
In my case the upload ("csv data to server", "parsed data to browser") is pretty fast, even though there are about 5 importStrategy="display" fields, which means MANY selects are done on the DB
The add operation after clicking the "Commit"-button does take a while though (0,03s upload/row and 2,14s add/row).
This results in a strange message, where the clientside BatchUploader says "Valid records added; some records remain in error", but the server is still processing the data. Also all records in the client are still present and I have this message in the Developer Console:
I could not reproduce this on the online showcase, but you should be able to do so, if you just add a Thread.sleep(2000) to the add-DMI of supplyItem.
Now you can say that 2sec for adding a row is too much and you are right and I will definitely tune this a bit (basically remove all unneeded cacheSyncs when processing the ADDs). But even if I get to 0,5sec, there will be some point where the browsers times out.
This point will be way before any acceptable threshold for a data centric enterprise application.
For really big data volumes there will be upload of plain file + background processing needed, but I think that there are still "easy" data loads where you can tell the user "please split your file and retry CSV upload".
Could you add a setter setMaxRowsAllowed(int maxRows). Once the serverside recognizes that it has to process more than the threshold, it stops parsing the CSV file and returns a new error message like "Processed 500 rows, but did not reach the end of file, yet. Please split the uploaded file and upload the chunks". The grid will stay empty then or wont be generated at all.
This way the user knows what is happening and can act. Every developer then can decide if he or she wants to use this feature and set the value to a value where no timeouts occur for their application or if he or she wants to use a (custom built) background processing instead. The advantage is that the user knows what is happening and that there a no timeouts possible.
Without such a feature a developer must always expect the time out and build a more complicated background processing with progress check.
A related feature is a button to remove all erroneous rows from the grid prior to commit. Especially with partial commit mode "Prevent" this would be very useful. I would place the button next to "Commit", if enabled.
My usecase here is that I have a unique field "SourceUID" (not the PK, but uploaded). With the button, the user could upload a file where he or she already knows that some entries are duplicate, but then directly get rid of those.
Especially the 1st point is important for me, as an user of mine just tried to upload 3500 rows which I was not able to process (parsing yes, adding no) - but there was no good error message.
Best regards
Blama
I have a problem with my batch uploader. I tried to reproduce in the EE Online Showcase, but was not able to do so.
In my case the upload ("csv data to server", "parsed data to browser") is pretty fast, even though there are about 5 importStrategy="display" fields, which means MANY selects are done on the DB
The add operation after clicking the "Commit"-button does take a while though (0,03s upload/row and 2,14s add/row).
This results in a strange message, where the clientside BatchUploader says "Valid records added; some records remain in error", but the server is still processing the data. Also all records in the client are still present and I have this message in the Developer Console:
Code:
--500x this message (the row count in my CSV), then the two last lines: 19:55:30.239:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:30.239:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:30.239:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:30.239:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:30.240:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:30.240:TMR0:WARN:RPCManager:getHttpHeaders called with a null XmlHttpRequest object 19:55:32.625:TMR0:WARN:Log:RangeError: Invalid string length Stack from error.stack:
Now you can say that 2sec for adding a row is too much and you are right and I will definitely tune this a bit (basically remove all unneeded cacheSyncs when processing the ADDs). But even if I get to 0,5sec, there will be some point where the browsers times out.
This point will be way before any acceptable threshold for a data centric enterprise application.
For really big data volumes there will be upload of plain file + background processing needed, but I think that there are still "easy" data loads where you can tell the user "please split your file and retry CSV upload".
Could you add a setter setMaxRowsAllowed(int maxRows). Once the serverside recognizes that it has to process more than the threshold, it stops parsing the CSV file and returns a new error message like "Processed 500 rows, but did not reach the end of file, yet. Please split the uploaded file and upload the chunks". The grid will stay empty then or wont be generated at all.
This way the user knows what is happening and can act. Every developer then can decide if he or she wants to use this feature and set the value to a value where no timeouts occur for their application or if he or she wants to use a (custom built) background processing instead. The advantage is that the user knows what is happening and that there a no timeouts possible.
Without such a feature a developer must always expect the time out and build a more complicated background processing with progress check.
A related feature is a button to remove all erroneous rows from the grid prior to commit. Especially with partial commit mode "Prevent" this would be very useful. I would place the button next to "Commit", if enabled.
My usecase here is that I have a unique field "SourceUID" (not the PK, but uploaded). With the button, the user could upload a file where he or she already knows that some entries are duplicate, but then directly get rid of those.
Especially the 1st point is important for me, as an user of mine just tried to upload 3500 rows which I was not able to process (parsing yes, adding no) - but there was no good error message.
Best regards
Blama
Comment