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 46900 - Use lazy filtering list to speedup explorer
Summary: Use lazy filtering list to speedup explorer
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 4.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL: http://wiki.netbeans.org/FitnessViaLa...
Keywords: PERFORMANCE
Depends on: 51716 53853 53854 53856 53857 67440
Blocks:
  Show dependency tree
 
Reported: 2004-08-04 15:16 UTC by Jaroslav Tulach
Modified: 2008-12-22 14:54 UTC (History)
8 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Implementation and tests of the lazy filtering list model (29.04 KB, patch)
2004-08-10 11:00 UTC, Jaroslav Tulach
Details | Diff
Additinal changes in openide/loaders and TreeView to support lazy explorer over data objects (20.29 KB, patch)
2004-09-21 08:09 UTC, Jaroslav Tulach
Details | Diff
The additional patch for openide/loaders and TreeView updated to current main trunk (24.23 KB, patch)
2004-10-04 16:48 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-08-04 15:16:29 UTC
Implement a ListModel that delegates to another
ListModel (which is itself lazy) and moreover
support filtering of items out from this model
while retaining all characteristics of such model
expected by Swing.

This is supposed to be useful for example when
filtering list of available classes from code
completion in editor or when scrolling in lazy
explorer.
Comment 1 Jaroslav Tulach 2004-08-04 15:23:12 UTC
The work is available in openide/src/org/openide/explorer/view and in
openide/test/unit/src/org/openide/explorer/view in a branch
lazy_list_46900 which is rooted at BLD200408021800. In order to get
the preview you can 

cvs co openide -f -r lazy_list_46900

and execute the test

ant -f openide/test/build.xml -Dxtest.attribs=empty
-Dxtest.include=**/LazyListModelTest*
Comment 2 Jaroslav Tulach 2004-08-10 10:59:32 UTC
I believe that the code in branch is currently in good state for a
working prototype. If the mdr team can provide lazy list and a filter,
I we can try this filtering list model as a model for code completion
JList and measure the speed up. Especially for "new " + Ctrl-Space it
could be really significant. I am going to attach the diff of current
state, in the test uncomment "testVisual" method to see the filtering
in action (keeps only even numbers).
Comment 3 Jaroslav Tulach 2004-08-10 11:00:14 UTC
Created attachment 16718 [details]
Implementation and tests of the lazy filtering list model
Comment 4 Jaroslav Tulach 2004-09-14 12:28:36 UTC
I have just branched org.openide.nodes so I can implement the laziness
in Children.Keys

openide/src/org/openide/nodes$ cvs upd -r BLD200409131800
openide/src/org/openide/nodes$ cvs tag -b lazy_list_46900

you can still get the whole branch by 

cvs co -r lazy_list_46900 -f openide

and run the tests

ant -f openide/test/build.xml -Dxtest.attribs=empty
-Dxtest.include=**/view/*Lazy*
Comment 5 Jaroslav Tulach 2004-09-21 08:09:48 UTC
Created attachment 17777 [details]
Additinal changes in openide/loaders and TreeView to support lazy explorer over data objects
Comment 6 Jaroslav Tulach 2004-10-04 16:48:53 UTC
Created attachment 18028 [details]
The additional patch for openide/loaders and TreeView updated to current main trunk
Comment 7 Jaroslav Tulach 2004-10-07 09:53:45 UTC
cvs -q ci -m "Creating lazy_list_46900 branch for whole openide and
bringing it up-to-date to BLD200410070525"
Comment 8 Jaroslav Tulach 2004-10-13 14:46:30 UTC
cvs -q ci -m "Bringing up to date with build BLD200410121800"
Comment 9 Jaroslav Tulach 2004-11-09 15:58:11 UTC
cvs ci -m "Bringing up to date with build BLD200411081900" openide
Comment 10 Jaroslav Tulach 2004-11-12 07:31:47 UTC
See 
http://openide.netbeans.org/proposals/arch/scalable-explorer.html
for description of what are the goals of such speedup.
Comment 11 Jaroslav Tulach 2004-11-29 13:43:25 UTC
cvs -q ci -m "Brought up-to-date with BLD200411281900"
Comment 12 Jaroslav Tulach 2004-11-29 16:51:49 UTC
cvs -q ci -m "Merging 34 new tests from the lazy_list_46900 branch to
trunk as they seem to test features that are not dependant on the
changes in code made in the branch"

Checking in src/org/openide/explorer/view/VisualizerNode.java;
/cvs/openide/src/org/openide/explorer/view/VisualizerNode.java,v  <--
 VisualizerNode.java
new revision: 1.46; previous revision: 1.45
done
Processing log script arguments...
More commits to come...
Checking in src/org/openide/nodes/Children.java;
/cvs/openide/src/org/openide/nodes/Children.java,v  <--  Children.java
new revision: 1.129; previous revision: 1.128
done
Processing log script arguments...
More commits to come...
Checking in
test/unit/src/org/openide/explorer/view/VisualizerNodeTest.java;
/cvs/openide/test/unit/src/org/openide/explorer/view/VisualizerNodeTest.java,v
 <--  VisualizerNodeTest.java
new revision: 1.2; previous revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in
test/unit/src/org/openide/nodes/ChildrenArrayNodeAtShouldNotBeSlowTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenArrayNodeAtShouldNotBeSlowTest.java,v
 <--  ChildrenArrayNodeAtShouldNotBeSlowTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in test/unit/src/org/openide/nodes/ChildrenArrayTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenArrayTest.java,v
 <--  ChildrenArrayTest.java
new revision: 1.6; previous revision: 1.5
done
Checking in
test/unit/src/org/openide/nodes/ChildrenFilterAsArrayTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenFilterAsArrayTest.java,v
 <--  ChildrenFilterAsArrayTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in test/unit/src/org/openide/nodes/ChildrenFilterAsKeysTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenFilterAsKeysTest.java,v
 <--  ChildrenFilterAsKeysTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in test/unit/src/org/openide/nodes/ChildrenKeysAsArrayTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenKeysAsArrayTest.java,v
 <--  ChildrenKeysAsArrayTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/src/org/openide/nodes/ChildrenKeysGarbageCollectTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenKeysGarbageCollectTest.java,v
 <--  ChildrenKeysGarbageCollectTest.java
new revision: 1.2; previous revision: 1.1
done
Checking in test/unit/src/org/openide/nodes/ChildrenKeysTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenKeysTest.java,v 
<--  ChildrenKeysTest.java
new revision: 1.13; previous revision: 1.12
done
Checking in test/unit/src/org/openide/nodes/FilterNodeTest.java;
/cvs/openide/test/unit/src/org/openide/nodes/FilterNodeTest.java,v 
<--  FilterNodeTest.java
new revision: 1.19; previous revision: 1.18
done
cvs diff: ChildrenArrayNodeAtShouldNotBeSlowTest.java is a new entry,
no comparison available
cvs diff: ChildrenFilterAsArrayTest.java is a new entry, no comparison
available
cvs diff: ChildrenFilterAsKeysTest.java is a new entry, no comparison
available
cvs diff: ChildrenKeysAsArrayTest.java is a new entry, no comparison
available
cvs diff: ChildrenKeysGarbageCollectTest.java is a new entry, no
comparison available
Comment 13 Jaroslav Tulach 2004-11-30 10:13:54 UTC
cvs -q ci -m "Bringing up to date with trunk build BLD200411291900, so
the backported tests are now synchronized"

Checking in test/unit/src/org/openide/loaders/OperationListenerTest.java;
/cvs/openide/test/unit/src/org/openide/loaders/OperationListenerTest.java,v
 <--  OperationListenerTest.java
new revision: 1.4.30.1; previous revision: 1.4
done
Processing log script arguments...
More commits to come...
Checking in test/unit/src/org/openide/util/MutexTest.java;
/cvs/openide/test/unit/src/org/openide/util/MutexTest.java,v  <-- 
MutexTest.java
new revision: 1.12.2.2; previous revision: 1.12.2.1
Comment 14 Jaroslav Tulach 2005-01-21 16:01:23 UTC
cvs -q ci -m "Bringing up to date with build BLD200501191900"
Comment 15 Jaroslav Tulach 2006-05-07 12:44:55 UTC
I would say that the branch "almost" works, but I am not aware of any plan to 
really get it into trunk:

- people may get LazyListModel, which works without problems
- the work on lazy Visualizers and FilterNode is also easily portable
- the improvements to Children.Keys may seem controversial

the basic problems right now are two - garbage collector negatively influences 
stability of the work in children and meanwhile there was a reformating effort 
in trunk and bringing the whole branch up to date may be pretty hard.
Comment 16 Antonin Nebuzelsky 2008-04-04 16:22:35 UTC
> the basic problems right now are ...

more to think about: how will quick search functionality live with the lazy list?
Comment 17 Jaroslav Tulach 2008-04-07 09:53:44 UTC
Let's give this project new boost: http://wiki.netbeans.org/FitnessViaLaziness
Comment 18 Jaroslav Tulach 2008-08-20 13:17:14 UTC
Present since 78bc89404dae