| Summary: | [Table] disposing of many TableItems is slow | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Björn Fischer <b.fischer> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P2 | CC: | elias, stefan.roeck | ||||
| Version: | 1.2 | ||||||
| Target Milestone: | 1.2 RC1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
If table items are disposed from top to bottom (lower indices first) and the top index is at the beginning of the table, then all rows are refreshed with each disposed item. Changed summay accordingly. Fixed in CVS HEAD Rüdiger, could you please attach a patch to allow porting this patch back to RAP 1.1.2 or give some advice which files are affected by this fix? Thanks. (In reply to comment #3) > R�diger, could you please attach a patch to allow porting this patch back to RAP > 1.1.2 or give some advice which files are affected by this fix? Thanks. The only change was in Table.js, function _removeItem() remove the call to this._updateRows(); Rüdiger, thanks for this fix. Just want to agree Stefan... Thanks, Rüdiger, for fixing this so fast! |
Created attachment 135309 [details] Testproject showing the performance bug There is a performance problem with the TableViewer when switching the input from a large amount of items to a small amount. To reproduce this bug do the following: 1. Create TableViewer with some columns 2. Create two Buttons, one to set a small input (List of 1 or 2 Objects), and one to set a large input (List of 500+ Objects) 3. Run the app, click the Button "setLargeInput", then click the Button "setSmallInput". The second click takes some seconds (depending on the number of objects in the _previous_ input) until the Table shows the correct items This behavoiur happens in Firefox and IE 7. I am using RAP 1.2 M7 (but the Problem was there in M6 and probably earlier too). I attach a project that contains a view demonstrating the behaviour. The problem seems neither to be in setInput(), nor in one of the LifeCicle phases. In the attached project I implemented time measurement for all these including syso's with the taken time. Measuring the time from second click until the items are shown gave the following results: Number of objecs in "large" input -> Time from click to show 200 objects -> 3 secs 400 objects -> 13 secs 800 objects -> 20 secs