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: | Fetching property values for CodeStyle is slow in Maven project | ||
---|---|---|---|
Product: | java | Reporter: | _ gtzabari <gtzabari> |
Component: | Source | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PERFORMANCE |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 204378 |
Attachments: | nps snapshot |
Description
_ gtzabari
2013-10-04 18:19:17 UTC
Created attachment 140816 [details]
nps snapshot
Java formatting after save is blocking awt-thread by writelock in document. Sending to java source for evaluation. the bottleneck seems to be the CodeStyle, reading preferencies. In the snapshot, preferencies are read from the project-based configuration; just the MavenProjectPropsImpl.MergedAuxProperties take ~1.4 sec out of 9 seconds the UI thread was blocked by formatter. Total time spent in property reading is comparable to the total time the Formatter is running. It seems the preference value is not cached anywhere between CodeStyle and MavenProjectPropsImpl.get(). I've made a local fix that caches values inside CodeStylePreferences, which will probably help formatter, but performance of the project-level properties implementation should be still improved. Rev. http://bertram.netbeans.org:8080/49606fbcab1a Integrated into 'main-silver', will be available in build *201310120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/49606fbcab1a User: Svata Dedic <sdedic@netbeans.org> Log: #236780: code style preferences are read-only cached |