Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 111522

Summary: Critical performance problem related to server / publish info
Product: [WebTools] WTP ServerTools Reporter: Fabrizio Giustina <fgiust>
Component: wst.serverAssignee: wst.server <wst.server-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: blocker    
Priority: P3    
Version: 0.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
sample .wtpmodules file none

Description Fabrizio Giustina CLA 2005-10-04 16:50:50 EDT
I currently use wtp M8 to run a couple of web applications with tomcat 5.5 servers.

In a workspace I have 2 web application projects and 2 different tomcat 5.5
servers defined. The server preferences are set to never publish automatically
(I always publish the webapp when creating the server, then never republish
since it seems to be totally useless).
With this environment after some time eclipse becomes absolutely slow: even when
pressing CTRL+S for saving a file it takes more than a couple of seconds,
EVERYTHING is slow. Restarting eclipse doesn't help... I had this kind of
problems for days and I started editing files outside eclipse

... but I just found out the following:
- go to .metadata\.plugins\org.eclipse.wst.server.core\publish and delete all
the content (2 file with a size from 100kb to 200kb)
- open .metadata\.plugins\org.eclipse.wst.server.core\publish.xml and delete all
the content inside the <publish-info></publish-info> tag
- restart eclipse

voilĂ : eclipse is back, fast as usual. And you will not experience any slow down
anymore, at least till you try to publish again and those xml files are generated.

This is a major problem for me, performance is not acceptable at all without
this hack. Why wtp is hanging if a publish file exists if I am simply saving a
text file? And why do that if publish is turned off and the server is not running?

This is a great target for a performance test... saving the content of an editor
while having a web application deployed to a server ;)
Comment 1 Fabrizio Giustina CLA 2005-10-04 16:57:37 EDT
if for any reason you need an example of a web application project with this
problem you can checkout http://svn.magnolia.info/svn/magnolia/branches/magnolia2.1/

If you have maven installed, you can run "maven eclipse" in order to generate
eclipse project descriptors and .wtpmodules files.
Comment 2 Fabrizio Giustina CLA 2005-10-04 17:34:13 EDT
some more info/tests (the performance problem seems not related only to publish
info):
- after restarting eclipse everything works fine & fast
- after starting and stopping a server everything is slow till a restart of
eclipse (also if the server is started once and immediately stopped)

test case:
- open eclipse, start and stop a server
- open a sample file (txt file), modify it and press ctrl+s: cpu to 100% for 3-5
seconds before save is perfomed (always reproducible)
- open the .wtpmodules file and comment ut all the content: try the same
operation as before and save is now immediate, without any impact on cpu.
- decomment .wtpmodules and try again: same as before, saving is slow and it
takes out a lot of cpu

this always works, commenting/decommenting .wtpmodules enables or disables
performance immediately...
Comment 3 Fabrizio Giustina CLA 2005-10-04 17:36:30 EDT
Created attachment 27836 [details]
sample .wtpmodules file

this is the .wtpmodules file from a project which has this performance problem
Comment 4 Fabrizio Giustina CLA 2005-10-04 17:56:52 EDT
... and this is the line in .wtpmodules that actually triggers the performance loss:

    <!--   
    <wb-resource deploy-path="/" source-path="/src/webapp">
    </wb-resource>
    -->

/src/webapp for this project contains 1.648 files and 275 folders, 5.92 MB in
total (does it mind? I'm just saving a text file)
Comment 5 Tim deBoer CLA 2005-10-04 18:07:17 EDT
This appears to be a dup of 105190, which is fixed in M9 HEAD and should be in
this week's I-build.

*** This bug has been marked as a duplicate of 105190 ***
Comment 6 David Williams CLA 2006-09-25 02:37:29 EDT
This bug was moved to 'closed' state, since it is so old and since it is a dup, worksforme, invalid bug that its unlikely to still be useful or need further attention. Feel free to re-open, or open a new bug, if this semi-automatic processing was done in error.