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.
Long time spent in the LuceneIndex._store() by method removing the used data. The problem is when an instance of o long ArrayList is sent toto the _store(), the store removes the already stored object by Iterator.remove() to save a heap. Unfortunately the AL.It.remove() delegates to AL.remove(index) which copies the array, so the complexity is O(n*n). This can be simply fixed by using LinkedList however RAM complexity (number of instances) for LL is O(2*n) compared to O(k+n) of AL. So usage of AL is correct type used, the LI._store() should not do the copying.
Fixed jet-main: 467a8519ac68 For 1_000_000 items added to index, the remove time decreases from 255_469ms to 72ms.
The fix seems to be OK.
Integrated into 'main-golden', will be available in build *201301180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/467a8519ac68 User: Tomas Zezula <tzezula@netbeans.org> Log: #225021:Long time spent in the LuceneIndex._store() by method removing the used data.
Transplanted int NB 7.3: f3631002e5cf
Integrated into 'releases', will be available in build *201301182100* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/f3631002e5cf User: Tomas Zezula <tzezula@netbeans.org> Log: #225021:Long time spent in the LuceneIndex._store() by method removing the used data.
v.