Bug 196587 - performance regression in NativeProject.findFileItem().
performance regression in NativeProject.findFileItem().
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
7.0
PC Solaris
: P2 (vote)
: 7.0
Assigned To: Alexander Simon
issues@cnd
: 70_HR_FIX, PERFORMANCE, REGRESSION
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-11 13:07 UTC by Alexander Simon
Modified: 2011-03-18 14:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-03-11 13:07:43 UTC
While refactoring of code model and project system was introduced a performance regression in find item method.
Finding uses linear search of project item by method:
MakeConfigurationDescriptor.findItemByPathImpl().
Should be replaced on direct search by map:
MakeConfigurationDescriptor.findProjectItemByPath().
It seem it was typo (selecting wrong method in code completion list).
Impact on IDE:
- time of configuring by code model is increased in x10 (x100) times. Time depends on project size. So project with 10K files cannot be configured in reasonable time.
- time of matching item->CsmFile on file event handlers is increased especially in case group changing.
Comment 1 Alexander Simon 2011-03-11 13:11:23 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/5a650c7fdbc6
Comment 2 Alexander Simon 2011-03-11 19:11:04 UTC
QA, please evaluate the bug for 70_HR_FIX_CANDIDATE
Comment 3 Quality Engineering 2011-03-12 09:43:42 UTC
Integrated into 'main-golden', will be available in build *201103120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5a650c7fdbc6
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #196587 performance regression in NativeProject.findFileItem().
Comment 4 Vladimir Voskresensky 2011-03-14 16:59:37 UTC
fix is safe and correct.
Comment 5 Vladimir Voskresensky 2011-03-14 17:00:48 UTC
we regressed in performance mistakenly using O(n2) algorithm instead of O(n)
Comment 6 Alexander Pepin 2011-03-15 14:33:46 UTC
verified in dev build
Comment 7 Alexander Simon 2011-03-16 07:34:10 UTC
integrated in release70, change set:
http://hg.netbeans.org/releases/rev/499052ad6023
Comment 8 Alexander Pepin 2011-03-18 14:56:08 UTC
verified in RC1 build 20110317


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo