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 180801 - LogViewer has strong performance impact on Glassfish
Summary: LogViewer has strong performance impact on Glassfish
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal with 1 vote (vote)
Assignee: Vince Kraemer
URL: http://forums.netbeans.org/topic22511...
Keywords:
: 187198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-16 13:17 UTC by keil
Modified: 2010-07-09 23:26 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
WebApp to reproduce the issue. (8.29 MB, application/octet-stream)
2010-05-28 11:00 UTC, keil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keil 2010-02-16 13:17:32 UTC
After a profiling session I have noticed that a Logger.log call within my enterprise app can take up to 1 second when Glassfish is started from NetBeans and the server.log is shown.

I never had this issue with previous NetBeans versions (6.5, 6.7), so I think it's a bug in NB 6.8.
Comment 1 Vince Kraemer 2010-05-12 19:56:55 UTC
can you provide more details on how to reproduce this issue?
Comment 2 keil 2010-05-28 10:52:24 UTC
It seems like the log file is locked from NetBeans while updating the viewer and so glassfish cannot write to the log.

To reproduce the issuue:
- deploy the attached WebApplication1.zip from NetBeans
- go to http://localhost:8080/WebApplication1/logtest
- hit the browser reload button a few times
- stop glassfish
- close NetBeans
- start glassfish from console
- go to http://localhost:8080/WebApplication1/logtest
- hit the browser reload button a few times

Results on my maschine:
when the log viewer is opened in NetBeans the Servlet takes up to 1600 ms to print the 20 log messages.

when glassfish is started form console (without an opened log viewer in NetBeans) the Servlet logs the 20 messages always under 1 ms.
Comment 3 keil 2010-05-28 11:00:34 UTC
Created attachment 99600 [details]
WebApp to reproduce the issue.
Comment 4 Vince Kraemer 2010-05-28 16:06:08 UTC
Thanks for the additional info and web app to help me reproduce this issue.
Comment 5 Vince Kraemer 2010-06-07 19:54:47 UTC
OK.  I am able to replicate the behavior using the sample app on Windows Vista.

I see the following... About 1 in 10 hits takes more than 10 millis...  When they do, they are in the 1000's of millis but less than 10,000 millis.

I could not replicate the issue on Mac OS X, so this may be a Windows only issue...
Comment 6 Vince Kraemer 2010-06-08 14:54:00 UTC
keil@netbeans.org: I think I have a fix for this.

It will not make it into 6.9... but I should be able to get it into 6.9.1 (the first patch) with your help.

To get the fix into the patch, I need to put it into the dev build and then get you to verify that the change was effective and does not appear to have any negative impacts.
Comment 7 ido.ran 2010-06-08 15:02:02 UTC
Is it possible that we will get the fixed version to help test it?
Comment 8 Vince Kraemer 2010-06-08 16:02:41 UTC
sure...  I will update the issue when the fix is available in a downloadable build.
Comment 9 Vince Kraemer 2010-06-08 17:30:34 UTC
You can get a zip distro of NB (not an installer) that has the fix in it from here: http://bertram.netbeans.org/hudson/job/web-main/3338/

An installable version will take a bit more time to generate
Comment 10 keil 2010-06-08 18:36:07 UTC
I have tested the fixed version and it works really good!

Glassfish starts up faster and SQL tracing with Hibernate (my original problem) can be done even if the server log is shown in NB. (produces a lot of log output and is terribly slow without the fix)

Great!
Comment 11 Vince Kraemer 2010-06-08 19:03:23 UTC
Thanks for the fast evaluation of the fix.
Comment 12 Quality Engineering 2010-06-09 06:54:56 UTC
Integrated into 'main-golden', will be available in build *201006090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/83257b9eab3b
User: vince kraemer <vkraemer@netbeans.org>
Log: #180801: DELAY slows server on Windows... a patch.
Comment 13 Vince Kraemer 2010-06-09 13:28:53 UTC
OK.  Now the fix is in a build with an installer.
Comment 14 Vince Kraemer 2010-06-17 16:18:29 UTC
resolved according to filer
Comment 15 Vince Kraemer 2010-06-22 14:27:09 UTC
escalated to p1, since I closed Bug 187198 as a dup of this issue issue.
Comment 16 Vince Kraemer 2010-06-22 14:28:09 UTC
*** Bug 187198 has been marked as a duplicate of this bug. ***
Comment 17 rbalada 2010-06-23 08:46:00 UTC
main #83257b9eab3b transplanted to release691 #fd05977ec593
Comment 18 ido.ran 2010-07-06 10:13:06 UTC
Hi,
I'm sorry to say that the problem return in NetBeans 6.9 official release.
I'm back to using NetBeans IDE Build 201006130001 which has the issue fixed.

I'm not changing the status because I want to check first if there is something wrong with what I did.

Ido.
Comment 19 Vince Kraemer 2010-07-06 16:25:06 UTC
(In reply to comment #18)
> Hi,
> I'm sorry to say that the problem return in NetBeans 6.9 official release.
> I'm back to using NetBeans IDE Build 201006130001 which has the issue fixed.
> 
> I'm not changing the status because I want to check first if there is something
> wrong with what I did.
> 
> Ido.

See comment 6 http://netbeans.org/bugzilla/show_bug.cgi?id=180801#c6 and
comment 17 http://netbeans.org/bugzilla/show_bug.cgi?id=180801#c17
Comment 20 ido.ran 2010-07-06 16:28:50 UTC
Sorry, my bad. Thank you very much.

Ido.