|TablePage / TableField performance problems when removing a large number of rows [message #1467960]
||Mon, 10 November 2014 13:00
| Urs Beeli
Registered: October 2012
Location: Bern, Switzerland
The problem below manifests itself with the SWT client, I have not tried to see how it behaves with Swing.|
I have a table page which contains 10 columns. The first one is AbstractColumn<Entity>, one is AbstractTimeColumn and the other 8 are AbstractStringColumns.
Depending on the search criteria in the search form (or the lack thereof) this table page sometimes contains between 5 and 50 rows, but can go up to 2000-6000 rows.
Interestingly, displaying a large number of rows does not take much time (running a query yielding 2000 rows takes a few seconds from DB through the server to the client until the number of records is shown below the table, then roughly another 3-5 seconds until the 2000 rows are shown in the table itself).
However, going back from this 2000 row table back to a table displaying only 5 rows is where I run into a huge performance hit. It takes less than one second until the summary line below the table changes to 5 records but then it takes more then 45 seconds with a wait cursor and the application "Not responding" until the table is cleared of the old rows and the 5 new rows are displayed.
I've tried to debug this using JProfiler but could not find anything telling me where this time is spent. While the update is running the method createAndRunWorkbench() is consuming most of the CPU time but it does not seem to call any methods that spend a lot of time (at least not as far as I could determine). The heap graph creates several peaks that I don't understand but so far I've been unable to understand where it is that something expensive takes place.
I've been able to reproduce the problem with the attached minimal scout application. Steps to reproduce the problem:
- unpack zip
- import into workspace
- set target
- start server
- start client
- in search form enter 5 + press search -> 5 entries are shown very fast
- in search form enter 2000 + press search -> 2000 entries are shown within a few seconds
- in search form enter 5 + press search -> it takes several dozens of seconds for the table to be updated
The application does not make use of any services, the data is created on the fly in the table page based on the input in the search form in order to demonstrate that the issue is purely client side.
Is this a known bug? Intended behaviour? Or am I doing something pathological?
Powered by FUDForum
. Page generated in 0.01687 seconds