Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 110898 - Bad publish performance regression in 1.0M8
Summary: Bad publish performance regression in 1.0M8
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5 M5   Edit
Assignee: Tim deBoer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 01:47 EDT by Igor Fedorenko CLA
Modified: 2017-10-11 15:53 EDT (History)
4 users (show)

See Also:


Attachments
sample webapp with 1500 jsp files in TAR.GZ format (19.80 KB, application/octet-stream)
2005-10-11 01:34 EDT, Igor Fedorenko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2005-09-28 01:47:08 EDT
I just upgraded my env from 0.7 to 1.0M8 and noticed that publish to tomcat test
environment (i.e. deploy modules from workspace) now takes ~25 seconds compared
to <1 second with 0.7. 

After some digging I've found that most of the time is spent in
J2EEFlexProjDeployable#members, which is called twice each time I publish. This
indeed is pretty I/O intensive call -- #members recursivly scans all resources
in all module's folders.

My workspace currently has just only one WAR with ~15 utility jar dependent
modules. Overall there is about 5k java classes and 1500 JSPs, so it is not
terribly huge.
Comment 1 Tim deBoer CLA 2005-10-07 17:23:59 EDT
Hi,
At least one performance fix went in this week that should help, but I'd like to
understand your scenario to make sure we do resolve this. Is your app or
workspace something that you can send me to reproduce the problem, or do you see
this for any size/type of web app?
Comment 2 Igor Fedorenko CLA 2005-10-11 01:34:52 EDT
Created attachment 28105 [details]
sample webapp with 1500 jsp files in TAR.GZ format

Attached is a sample web app with 1500 JSP files. I expected to see almost
instant publish with "my" tomcat server plugin but it actually takes ~10
seconds on my T42. Interestingly enough, it takes ~15 seconds to publish the
same project to using standard WTP tomcat plugin.
Comment 3 Igor Fedorenko CLA 2005-10-13 10:58:59 EDT
I've found a solution/workaround for this problem. Looking at what happens in
ServerBehaviourDelegate#publish(int,IProgressMonitor) I found two i/o intensive
calls that account for the unexpected delay. First, in order to calculate
per-module deltaKind (i.e. added, deleted, changed or no_change) 
getPublishedResourceDelta(IModule[]) is called. Then
updatePublishInfo(int,IModule[]) is called for each module to store all module
resources in ModulePublishInfo. "My" tomcat plugin does not use deltaKind nor
module published resources, so I overrode the two time consuming methods to
basically do nothing and this solved publish performance problem for me.

This is not a problem for me anymore. You can close this bug if you do not plan
to make similar changes to other server plugins or to WTP server framework itself.
Comment 4 Alexey Kazakov CLA 2005-11-14 13:18:03 EST
I have the same problem but not only for publishing.

1. Create a big project like Igor's example (Dynamic Web Project, Tomcat 5.0 is 
target runtime).
2. Create Tomcat 5.0 Server and add module to this server.
3. Try to edit and save any file (e.g. web.xml).
It takes a long time.

The cause is the same: getPublishedResourceDelta(IModule[]) and
updatePublishInfo(int,IModule[])

Igor's workaround is not useful for this situation.
Comment 5 Tim deBoer CLA 2005-11-21 23:14:58 EST
Performance improvements to the members() method is covered by 116149. I've just released some additional improvements to the server code.

Publishing is going to be slower than M8 because there is no .deployables directory anymore and we're almost always going to have to copy resources. I beleive these two bugs will improve the performace significantly; if you still see issues once 116149 is released as well (hopefully for M9) then please open up additional bugs.
Comment 6 David Williams CLA 2006-03-04 01:04:57 EST
This change is a bulk update of all _un_targeted, fixed, resolved bugs upon release of M5. This particular bug _might_ have been fixed earlier than M5. (Feel free to correct). 

Comment 7 Igor Fedorenko CLA 2006-06-26 16:31:51 EDT
verified
Comment 8 Tim deBoer CLA 2006-06-27 16:58:50 EDT
Closing.
Comment 9 Eclipse Genie CLA 2017-10-11 15:53:59 EDT
New Gerrit change created: https://git.eclipse.org/r/107579