SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Slowness after 1000 invoices
Tagged: browser, cache size, client, Slowness issue
- This topic has 4 replies, 4 voices, and was last updated 1 year, 1 month ago by RRowley.
January 9, 2022 at 1:19 am #1635rajyaguruParticipant
Does anyone observed slowness about 10-15 seconds for each page response time post 1000+ invoices? Any action required to get same response time when invoices are 500.January 10, 2022 at 10:56 am #1636fearless359Keymaster
The logic uses DataTables ajax with deferred rendering to make initial display as fast as possible. On my windows development system I get about a 3 second lapse to display the first page of invoices from a 550 total table. I don’t have a larger table to work with. On my production system that is hosted for me on a shared Linux server, there is about 1 second added to the display time. In either case, if after displaying the first page, I select the option to display the last page, there is no latency in the display on either system.
This is what I would expect give that the ajax display copies all the invoice data from the server to the browser when the initial page is displayed. The deferred rendering simply allows the first page of the data to be rendered and displayed while the logic continues to render the rest of the data in preparation for display.
Without more data to test with, I can’t give you comparative results. You might look at increasing your cache size. Also having an SSD rather than HDD can speed things up also.
The bottom line is that the bulk of the processing time for you page is on the client, not the server. Speed up the client and you should have better results.January 18, 2022 at 11:25 am #1637rajyaguruParticipant
I highly appreciate your quick response and detail. This helped me to to understand the slowness reason. I will try with my shared hosting provider if this can be improved and revert you.March 23, 2022 at 10:14 pm #1670redcuillinParticipant
I use datatables on another project, and have the same problem where once you get to around 1000 rows, things can get very slow.
Right now, the user with 1000 invoices gets 1000 rows of invoice data, even if they only want to display 15. I have about 500, and everything is fine, but I am starting to notice small delays as json loads.
It’s possible to return json in a way that datatables loads only as much as is needed to display and then makes additional calls for more data when needed. I think it’s part of datatables options. It’s a fix I’m working on on that other project. Might be tricky though because of the way SI stores json in the temporary data.json file. It also might impact the ability to search all invoices without an additional call to server.April 5, 2022 at 4:00 pm #1671RRowleyParticipant
The setting to defer rendering of other than the first page is set. This allows first page to display one rendered, deferring the rendering of the remaining page until requested to computer overhead allows. Not sure how to improve on this short of changing the logic to only display x-months worth of data on initial load with an option like a flag up top to load remaining data. If people keep having trouble like this, that might be a solution to be pursued.
- You must be logged in to reply to this topic.