Community
Participate
Working Groups
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.
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?
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.
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.
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.
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.
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).
verified
Closing.
New Gerrit change created: https://git.eclipse.org/r/107579