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: | LowPerformance took 6145 ms. | ||
---|---|---|---|
Product: | javaee | Reporter: | dwuysan <dwuysan> |
Component: | EJB | Assignee: | Martin Fousek <marfous> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ads, cdicarlo, hantsy, juger89, lallafa, pjiricka |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 183465 |
Attachments: | nps snapshot |
Description
dwuysan
2011-12-06 05:21:09 UTC
Created attachment 113848 [details]
nps snapshot
i get this "slowness detected" when switching from jsf source file to a java source file (in editor usinf ctrl-tab) in a maven web project. in NB 7.0 it was related to #200997. Looks like a duplicate of bug 200997 - Martin please confirm. *** This bug has been marked as a duplicate of bug 200997 *** I'm reopening this one (see discussion in issue 200997 for some background).. I dont't know how if this is the correct issue but issue 200997 has been closed with reference to this one. It's true, that I don't get "slowness detected" messages with NB 7.1 related to this. But sometimes switching from a JSP file to it's java bean file is still very slow (10 to 20 seconds, or more?). I have a maven web project with 80 JSPs. I just tried it again. It took more than 15 seconds. I clear the netbeans.log befor switching from JSP to java file. This is the content after the switch: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 14.141 ms. java.io.IOException at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:444) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:403) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider.setServletClasses(WebReplaceTokenProvider.java:375) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider.access$000(WebReplaceTokenProvider.java:90) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$1.run(WebReplaceTokenProvider.java:309) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991) Caused by: java.io.IOException: Setting attribute not allowed for JarFileSystem [D:\Dokumente und Einstellungen\clav02\.m2\repository\javax\faces\jsf-api\1.2_15\jsf-api-1.2_15-sources.jar!javax/faces/webapp/FacesServlet.java <- org.netbeans.modules.web.IsServletFile=true] at org.openide.filesystems.JarFileSystem.writeAttribute(JarFileSystem.java:671) at org.openide.filesystems.JarFileSystem$Impl.writeAttribute(JarFileSystem.java:1222) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:357) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:340) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$3.run(WebReplaceTokenProvider.java:398) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$3.run(WebReplaceTokenProvider.java:375) at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:482) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:643) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:154) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:138) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:211) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:208) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:168) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:356) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:71) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:208) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106) at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:432) ... 6 more java.io.IOException at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:444) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:403) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider.setServletClasses(WebReplaceTokenProvider.java:375) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider.access$000(WebReplaceTokenProvider.java:90) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$1.run(WebReplaceTokenProvider.java:309) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991) Caused by: java.io.IOException: Setting attribute not allowed for JarFileSystem [D:\Dokumente und Einstellungen\clav02\.m2\repository\javax\faces\jsf-api\1.2_15\jsf-api-1.2_15-sources.jar!javax/faces/webapp/FacesServlet.java <- org.netbeans.modules.web.IsServletFile=true] at org.openide.filesystems.JarFileSystem.writeAttribute(JarFileSystem.java:671) at org.openide.filesystems.JarFileSystem$Impl.writeAttribute(JarFileSystem.java:1222) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:357) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:340) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$3.run(WebReplaceTokenProvider.java:398) at org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider$3.run(WebReplaceTokenProvider.java:375) at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:482) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:643) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:154) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:138) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:211) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:208) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:168) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:356) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:71) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:208) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106) at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:432) ... 6 more WARNING [org.netbeans.JarClassLoader]: Opening C:\Programme\NetBeans 7.1\ide\modules\org-netbeans-modules-utilities.jar took 593 ms I just created another slowness report (http://statistics.netbeans.org/analytics/exception.do?id=574311) that is now assigned to issue 200997. Thanks for pointing this out. The last slowness report you just added looks like a different issue and from the snapshot it's related to JSF editor (expression language) --> reassigning to Marek for evaluation. As Petr suggested I've created separate issue 211400 related to your snapshot lallafa. (so reassigning this one back to me) Lallafa the problem you reported two days ago should be fixed now (see issue 211400 for more datails). Would be great if you could confirm that using latest builds. I tried NB 201204210400 (fresh install, no import of old settings). But that build seems to be completely broken. No syntax highlighting, auto complete what so ever in java and jsp files. I might try again after bug 208690 is resolved ... Denis, could you please help me with this one? The problem lies in the WebReplaceTokenProvider class (specifically in the part checking if the selected file is a servlet). You were actually the one fixing the original performance problem where the check was too slow when scanning were already in progress (issue 172931). That works just fine, but now there is a problem with SourceUtils.getFile call in the setServletClasses() method (it looks that it's quite expensive but not sure how should I solve that). Any ideas are welcome! Thanks (In reply to comment #11) > Denis, could you please help me with this one? The problem lies in the > WebReplaceTokenProvider class (specifically in the part checking if the > selected file is a servlet). You were actually the one fixing the original > performance problem where the check was too slow when scanning were already in > progress (issue 172931). > > That works just fine, but now there is a problem with SourceUtils.getFile call > in the setServletClasses() method (it looks that it's quite expensive but not > sure how should I solve that). Any ideas are welcome! Thanks It's not really a problem with SourceUtils.getFile call. This call is done in the separate thread org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider ( it's thread name ). The latter thread calls setServletClasses method and then SourceUtils.getFile inside JavaSource lock. AWT thread tries to invoke model method which also need to acquire lock inside JavaSource . As result it needs to wait until setServletClasses method finished. It means that ANY lock on JavaSource ( in any other place not just inside org.netbeans.modules.maven.j2ee.web.WebReplaceTokenProvider ) will block the isServletFile() method. So it seems any such action ( which has a JavaSource call inside its "isEnabled()") shouldn't use any Java infrastructure based model ( JavaSource directly or via MetaModel impl ) at all. I think method should be rewritten to avoid such calls. Servlet should be detected f.e. ONLY if it has appropriate attribute ( IS_SERVLET_FILE ). All work that asks servlets from a model should be done in the separate thread. This work just (re-)assign mentioned attribute. Actually it is almost done at the moment. Some minor modifications are required. Ok, I have evaluated latest 5 snapshots (starting with 7.3dev and newer) and non of them is J2EE Maven related. NPS 633532: comming from general maven but caused because NbMavenProject.doFireReload() is calling File.isDirectory which is waiting for almost 10s for WinNTFileSystem.getBooleanAttribute (I don't think we can fix this one) NPS 628026: caused by html.editor (hint counting I guess) NPS 618670: again comming from general maven but caused by IO operation NPS 618617: caused by findbugs plugin analyzing code NPS 614737: comming from j2ee.ejbverification ..so they are basically two performance issues that we should fix (html.editor.hint and j2ee.ejbverification) + ideally we can improve findbugs plugin Reassigning to html.editor (NPS 628026) --> please evaluate and pass the issue to the j2ee.ejbverification owner (not sure who that is to be honest:)) > Reassigning to html.editor (NPS 628026) --> please evaluate and pass the issue
> to the j2ee.ejbverification owner (not sure who that is to be honest:))
This one is a duplicate of issue 221841, passing to ejb
> NPS 614737: comming from j2ee.ejbverification
There was unnecessary check which was causing such slowness although it was totally ok. On the other side the filesystem wasn't from the fastest one again. Anyway, the check was removed in web-main #39ffdf1b649c (hg.netbeans.org/web-main/rev/39ffdf1b649c).
BTW, the issue #221421 was resolved as wontfix since I was not able to improve rest 2/3 of slowness caused by slow WinNT filesystem - so the fix belongs rather to this issue. |