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 108568 - Don't call fixFakeRegistrations() for *each* file
Summary: Don't call fixFakeRegistrations() for *each* file
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-30 10:45 UTC by Vladimir Kvashin
Modified: 2008-06-26 13:38 UTC (History)
0 users

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 Vladimir Kvashin 2007-06-30 10:45:55 UTC
Each time project finishes its parsing (not only after initial parsing), fixFakeRegistrations() method is called for
each file. This was OK before we introduced repository, since if a file has no fake registrations, the method returned
immediately. But ow files do not need to be necessarily in memory. Therefor this operation can take significant time ad
cause peak memory consumption. This behavior should be changed.
Comment 1 Vladimir Kvashin 2007-06-30 10:55:03 UTC
I'm not quite sure it's really a P2. 
The issue should be investigated; probably investigation will result in downgrading to P3.
Comment 2 Vladimir Kvashin 2007-07-06 13:37:37 UTC
Note that fixFakeRegistrations() is also called from FileImpl.getDeclarations().
I believe this is incorrect. We should try fixFakeRegistrations() only when file current file depends on become parsed.
Comment 3 Vladimir Kvashin 2007-07-12 18:29:34 UTC
This is a room for performance improvement, not a defect.

Comment 4 Vladimir Voskresensky 2007-07-13 11:54:36 UTC
the prototype is implemented under flag SKIP_UNNECESSARY_FAKE_FIXES in FileImpl. 

cvs log:
Checking in FileImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileImpl.java,v  <-- 
FileImpl.java
new revision: 1.2.2.41.4.64.4.39; previous revision: 1.2.2.41.4.64.4.38
done
Comment 5 Vladimir Kvashin 2008-04-07 10:07:40 UTC
I believe it's a performance defect.
Even if a project contains 20,000 files and there are NO fakes, all these 20,000 files will be instantiated each time...
Comment 6 Vladimir Voskresensky 2008-06-26 13:38:34 UTC
no more a problem