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.
Summary: | AWT thread blocked for 16047 ms. | ||
---|---|---|---|
Product: | projects | Reporter: | ravindranathakila <ravindranathakila> |
Component: | Maven | Assignee: | David Simonek <dsimonek> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | mkleint, _m4c0_ |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 157710 |
Attachments: | nps snapshot |
Description
ravindranathakila
2009-11-10 19:58:05 UTC
Created attachment 90759 [details]
nps snapshot
This issue already has 24 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=157710 dafe can you look at this one please? My evaluation so far: Profiler logs contain several situations. Most common and dangerous is when NbMavenProjectImpl$Info.getDisplayName() is called (in EQ thread) when loading of other project or reloading of the same project occurs at the same time (outside EQ, of course). Then EQ thread is blocked waiting, as getDisplayName can end in NbMavenProjectImpl.getOriginalMavenProject, which somehow waits for NbMavenProjectImpl.loadMavenProject. Typical example is that during maven execution (project build, run), project is asked for its display name. I can't recognize from snapshots if it's the same project or different one. NbMavenProjectImpl.getOriginalMavenProject should currently only block on the first, initial load of the project and be cached from then on. Any subsequent refreshes of the model (after build, on user action) will first load the project off AWT (and keep serving the old content) and only when finished quickly replace the cached value. AFAIK the method should allow loading projects concurently, there is no lock across projects (unless there is something within the maven internals that gets synced and becomes the bottleneck) the first loading of the project should always happen on background for opened projects, the risky group are the projects that are non opened but somehow used. The appearing bottlenecks and inevitable there. maven3 might help there in terms of speeding up the process of loading. We hopefully found main reason of blocking: NbMavenProjectImpl.getOriginalMavenProject and NbMavenProjectImpl.loadMavenProject share the same lock (both are synchronized) but loadMavenProject needn't to be, as it loads and returns alternate instance of MavenProject and doesn't touch instance data. Thanks mkleint for assistance. Btw reports also include other issue, clicking on test link in output window can froze system for a while, I will create separate issue for that problem. fixed in 1281281b08ef v. |