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 45991 - Too many unnecessary composed filters with VCS DataObjects
Summary: Too many unnecessary composed filters with VCS DataObjects
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-07-09 18:21 UTC by Antonin Nebuzelsky
Modified: 2004-08-13 12:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Suggested patch (2.75 KB, text/plain)
2004-07-09 18:25 UTC, Antonin Nebuzelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2004-07-09 18:21:58 UTC
Analysis of long time of the first invocation of
CTRL+SHIFT+8 on a file open in editor revealed
that each DataObject has a structure of
recursively composed DataFilters attached to it.
Thus when accept method is called to find out if
the node should be displayed or not, all of these
filters are called. The number of these attached
filters is equal to the number of directories
above the DataObject and all the filters are equal
in functionality (only different instances of
VersioningDataFolder.FileDataFilter).
Comment 1 Antonin Nebuzelsky 2004-07-09 18:24:40 UTC
I suggest the attached patch. It creates one common instance of
VersioningDataFolder.FileDataFilter used for filtering all nodes of
VCS filesystem and it assures in DataFolder class that two references
to one filter instance are not joined into a composite filter.
Comment 2 Antonin Nebuzelsky 2004-07-09 18:25:15 UTC
Created attachment 16181 [details]
Suggested patch
Comment 3 Martin Entlicher 2004-07-12 10:36:25 UTC
The patch looks O.K. It's better anyway to have just one instance of
the data filter.
Comment 4 Antonin Nebuzelsky 2004-07-12 15:28:52 UTC
Checking in DataFolder.java;
/cvs/openide/loaders/src/org/openide/loaders/DataFolder.java,v  <-- 
DataFolder.java
new revision: 1.29; previous revision: 1.28
done

Checking in VersioningDataFolder.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/versioning/impl/VersioningDataFolder.java,v
 <--  VersioningDataFolder.java
new revision: 1.7; previous revision: 1.6
done

Checking in VersioningDataSystem.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/versioning/impl/VersioningDataSystem.java,v
 <--  VersioningDataSystem.java
new revision: 1.12; previous revision: 1.11
done