This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258696 - Improve performance of OutlineView
Summary: Improve performance of OutlineView
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2016-04-06 21:31 UTC by jnk
Modified: 2016-09-01 15:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jnk 2016-04-06 21:31:39 UTC
OutlineView does not perform good enough on big models and there are many reasons for this. Instead of refreshing only the window that is visible, it refreshes all the rows (visible and invisible ones). Not only, if a node's field is not displayed as a column, it refreshes everything! The following is from PropertiesRowModel (lines 110-116):

if (column == -1) {   // the column is not displayed
   outline.tableChanged(new TableModelEvent(outline.getModel(), row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE));
} else {
   outline.tableChanged(new TableModelEvent(outline.getModel(), row, row,  column+1, TableModelEvent.UPDATE));
}

It's not uncommon for an object to have properties - getters - that are computed from other properties.  So, a property change occurs - there is no way for the tree table to know if that means other properties are going to be recomputed as a result or not.  So it errs on doing what will guarantee that the right thing is displayed - recompute all cell values for that row.

I see two optimizations here that would add up to a fix for your immediate problem, and they're not hard:

1.  In the component, determine if the rows are displayed before processing the event (you could do that in the model, but that would introduce component -> model coupling which isn't a good idea)
2.  Have a setting that disables the ALL_COLUMNS event entirely if column == -1.  That wouldn't be desirable as the default behavior, but if you don't have properties that depend on the value of other properties, that would let you disable these events.
Comment 1 Martin Entlicher 2016-09-01 15:19:33 UTC
P3 seems to be a more appropriate priority according to bug priority guidelines.