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 98081 - getSubprojects implementation is uneffective
Summary: getSubprojects implementation is uneffective
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-03-16 13:10 UTC by Vladimir Voskresensky
Modified: 2007-11-23 10:43 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 Voskresensky 2007-03-16 13:10:03 UTC
Having somewhere configured per-file MySQL project, go to Project Open select
MySQL project and wait till the information about Dependent projects will be
filled up: getSubproject spent 75 sec on opening MySQL project.

used SAX parser can very fast go to the necessary "subproject" part of
project.xml and return necessary information, no need to parse full project.xml
and create project.
Comment 1 Thomas Preisler 2007-04-12 20:13:29 UTC
Sub project information is not stored in project.xml but embedded in
configurations.xml and it would be hard to get to the information without fully
parsing configurations.xml.

The metadata is designed to be stored in two xml file to solve exactly this
performance problem. Only if you need full project information you will need to
parse configurations.xml. For information like project name and project type it
is only needed to parse project.xml.

Unfortunately the sub projects are not stored in projects.xml so it needs to do
full project parsing to get to this info.

The solution is to store additional info about sub projects in projects.xml. I
will explore how complicate this is to do and also evaluate the risk. 

I don't believe this is a true P1 because it doesn't interrupt the user flow in
any way. Parsing of the project will just continue in the background. The 'only'
impact to the user is a performance slowdown while the project is being parsed.
Will downgrade to p2.
Comment 2 Thomas Preisler 2007-07-26 04:28:04 UTC
Fixed. Sub projects are now stored in project.xml:
            <make-dep-projects>
                <make-dep-project>../hello2lib</make-dep-project>
                <make-dep-project>../hello3lib</make-dep-project>
                <make-dep-project>../hello4lib</make-dep-project>
                <make-dep-project>../hello1lib</make-dep-project>
            </make-dep-projects>

GetSubprojects() will read this section from project.xml instead of getting it from configuration.xml which basically
forces the entire project to be constructed.