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 109184 - ProfilingPointsManager.processOpenedProjectsChanged slows down project opening
Summary: ProfilingPointsManager.processOpenedProjectsChanged slows down project opening
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-07-10 00:35 UTC by Jesse Glick
Modified: 2007-09-08 16:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Representative excerpt from a thread dump (5.81 KB, text/plain)
2007-07-10 00:36 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-07-10 00:35:47 UTC
070709. I opened the nbbuild freeform project (_not_ its required projects). The project opening dialog stayed open for
quite a long time, with heavy CPU activity. This surprised me since the project itself is small and ought to open quite
quickly - which until today it always has. Thread dumps showed that ProfilingPointsManager.processOpenedProjectsChanged
was doing something with the subproject list.

Please do not do this. I was not even using the profiler in this session at all, and I do not wish for project opening
to be many times slower because of some profiler feature.
Comment 1 Jesse Glick 2007-07-10 00:36:26 UTC
Created attachment 44856 [details]
Representative excerpt from a thread dump
Comment 2 Jiri Sedlacek 2007-07-10 16:11:31 UTC
We need to get a list of all subprojects for each opened project to find all defined profiling points, display them in 
Profiling Points window and eventually use them for profiling. If SubprojectProvider.getSubprojects() is too slow and 
shouldn't be used, then this should probably be mentioned in API documentation. I can't see anything we can change at 
profiler side.

Processing subprojects moved from EDT to RequestProcessor, Opening Project dialog is no more blocked. Fixed for Beta1.
Comment 3 Jesse Glick 2007-07-10 19:14:23 UTC
But I'm not even using the profiler! Can't you simply defer all this work until the user actually tries to profile
something?
Comment 4 Jiri Sedlacek 2007-07-10 19:25:06 UTC
Profiling points are shown in editor as annotations the same way as breakpoints no matter if you use the
profiler/debugger or not. That's why opened projects & their subprojects have to be processed everytime to load the
profiling points and display them when necessary.
Comment 5 Jesse Glick 2007-07-10 19:31:52 UTC
I can understand loading profiling points from open projects to display editor annotations, but why subprojects? In this
example, I might have had some points in nbbuild/antsrc (I did not, in fact), but why does it matter what its
subprojects were? The only subproject in which I actually have any profiling points is java/project - 1 out of ~500 -
and that was not open, nor was I opening any files from it.
Comment 6 Jiri Sedlacek 2007-07-10 19:46:18 UTC
During profiling session profiling points defined for profiled project and its subprojects are processed, that's why
they should also be displayed in appropriate sources.

I understand that processing all 500+ subprojects takes some time without any benefit for you, but I believe this is a
cornercase - typically the projects aren't so big, typical NetBeans user doesn't have this sort of problems. I would
like to do something for nbbuild, but I really don't see any reasonable solution except disabling profiling points for
NetBeans modules at all, but that's probably not what we want.
Comment 7 Alexander Kouznetsov 2007-09-08 11:42:44 UTC
jglick, could you please verify this issue?
Comment 8 Jesse Glick 2007-09-08 16:43:22 UTC
I'm not sure what the fix was, but seems to be solved in a current dev build.