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 206281 - Slowness causing Tomcat ServerLog$AnalyzingLineProcessor
Summary: Slowness causing Tomcat ServerLog$AnalyzingLineProcessor
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 243861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-12 16:09 UTC by alied
Modified: 2014-07-18 15:12 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot of IDE after closing connection to localhost Oracle db (46.78 KB, application/octet-stream)
2011-12-12 16:09 UTC, alied
Details
jstack thread dump (30.62 KB, text/plain)
2011-12-14 10:16 UTC, paolosca
Details
Snapshot (67.85 KB, application/octet-stream)
2011-12-14 10:17 UTC, paolosca
Details
Snapshot (198.15 KB, application/octet-stream)
2011-12-14 10:17 UTC, paolosca
Details
self sampler; 12/12/2011 14:20 (1.38 MB, application/octet-stream)
2011-12-14 13:48 UTC, alied
Details
self sampler; 12/12/2011 13:00 (757.62 KB, application/octet-stream)
2011-12-14 13:50 UTC, alied
Details
snapshot screenshot 1 (271.61 KB, image/png)
2012-04-16 14:30 UTC, Milos Kleint
Details
snapshot screenshot 2 (211.12 KB, image/png)
2012-04-16 15:12 UTC, Milos Kleint
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2011-12-12 16:09:26 UTC
Created attachment 114051 [details]
Snapshot of IDE after closing connection to localhost Oracle db

After accessing Localhost Oracle (URL="jdbc:oracle:thin:@localhost:1521:XE") with Oracle jdbc driver the IDE gets slugish; even after closing the connection.
Attach snapshot since after closing the connection.
Also I have a web application on Tomcat, in case it helps.
Comment 1 Jiri Rechtacek 2011-12-13 08:29:05 UTC
After investigation the snapshot I can see the only expensive operation what is eating 1/3 of CPU is tomcat.ServerLog$AnalyzingLineProcessor. Maybe someone from editor team might give a hint how to rid calling GlobalPathRegistry.findResource from output line analyzer.
alied, could you attach also selfsampler<timestamp>.npss file which is located in your system temporary directory?
Comment 2 paolosca 2011-12-14 10:11:36 UTC
I'm experiencing the same problem connecting to an oracle db but I'm not using tomcat.

After opening the connection in the db explorer (services panel) and executing a few queries the ide start getting very slow, memory usage goes at over 700MB and eventually it become so slow that it's unusable.

I attach a snapshot taken while the IDE was extremely slow and a thread dump.

Regards,

Paolo.
Comment 3 paolosca 2011-12-14 10:16:28 UTC
Created attachment 114143 [details]
jstack thread dump
Comment 4 paolosca 2011-12-14 10:17:00 UTC
Created attachment 114144 [details]
Snapshot
Comment 5 paolosca 2011-12-14 10:17:25 UTC
Created attachment 114145 [details]
Snapshot
Comment 6 Jiri Rechtacek 2011-12-14 10:21:28 UTC
Paolo, please don't mix two problems together. Let's solve Tomcat problem in this  issue and open new issue for db one. Check also other reports for db performance and past your snapshots there if similar. Thanks
Comment 7 alied 2011-12-14 13:48:20 UTC
Created attachment 114160 [details]
self sampler; 12/12/2011 14:20

The previously uploaded snapshot was 12/12/2011 13:07
Comment 8 alied 2011-12-14 13:50:40 UTC
Created attachment 114162 [details]
self sampler; 12/12/2011 13:00
Comment 9 paolosca 2011-12-14 16:34:35 UTC
(In reply to comment #6)
> Paolo, please don't mix two problems together. Let's solve Tomcat problem in
> this  issue and open new issue for db one. Check also other reports for db
> performance and past your snapshots there if similar. Thanks

Sorry, I thought it was the same defect because the symptoms are identical. I opened a new bug report:

http://netbeans.org/bugzilla/show_bug.cgi?id=206396

Thanks,

Paolo
Comment 10 Petr Hejl 2012-04-16 14:17:49 UTC
Is there a lot of stack traces in the log? The slowness itself seems to be related to Maven project queries.
Comment 11 Milos Kleint 2012-04-16 14:30:07 UTC
Created attachment 118339 [details]
snapshot screenshot 1
Comment 12 Milos Kleint 2012-04-16 15:12:10 UTC
Created attachment 118345 [details]
snapshot screenshot 2

on the maven side apparently vast majority of time is spent in OS level filesystem calls (eg 4000 ms in lastModified check) - see screenshots

technically the MavenForBinaryQueryImpl attempts to check the classpath url against the maven project's output directories to see if it's a match. It's only done on maven projects themselves, so the file:// protocol url belonged to the maven project.
The occurence of the MavenProject loading is occurring conditionally, most probably the project in question was not opened, there was severe need to memory and cached Mavenproject instance were discarded (using softreference there afaik)  or something unknown.
Comment 13 Milos Kleint 2012-04-16 15:14:34 UTC
phejl, please advice how to proceed beyond pure analysis of the problem.
Comment 14 Milos Kleint 2012-11-05 12:50:20 UTC
I suggest the tomcat output processor just marks all stacktrace like (or whatever the criteria is) likes as hyperlinks without first checking if the line is indeed clickable (can be found in projects) and only performs the check when someone actually clicks the hyperlink. That will speed up the processing significantly, AFAIK we've done the same in general maven output processing as well.
Comment 15 Petr Hejl 2014-07-18 15:12:33 UTC
*** Bug 243861 has been marked as a duplicate of this bug. ***