7 Replies Latest reply on Apr 17, 2009 1:09 PM by Jaime Martin

    Hot Deployment is slow and has bugs with Seam 2.1

    Ramazan YILDIRIM Newbie

      When the number of components in a Seam project grows Seam hot deployment is working dead slow. I have profiled Seam and found the source of performance problems.


      First, if you are not using groovy, remove groovy jar from your deployment. Seam spends some time for groovy file changes and it really takes sometime if you have more than a few classes in your project.


      The problem with hot deployment is for each request, Seam does scan all the class files for a change checking their last modifed time. While doing this it does also generate the component tree. And this component tree generation takes long long time.


      Secondly, Seam redeploys war directory content on each request. Actually it even doesn't check if there is a change!


      So when you request a single page, your browser most probably hits several times to the application server, not once. So on each page request this redeployment stuff works over and over.


      I have a temporary local fix. I first check if there is a class change first (while doing this do not generate the component tree),if there is a change, I do a second scan this time to generate the component list.


      Second thing is I applied an exclusion filter for xhtml files. They are excluded from scans. Mostly changes are done to xhtml files and they have nothing got to do with seam.


      Third, as I said there is no check for war file changes, they are deployed each time. I have put a timestamp check for war file changes. If there is no changes to page.xml jpdl.xml files, then there is no war redloyment or whatever you name it.


      Oh and there is a  bug in URLScanner.handleScanner method it actually should be touchTimestamp(child); but it is   touchTimestamp(file);
      It keeps checking the parent directory for each file.


      And I have a recommendation, while deploying for hot deployment we could generate and update a dummy hot.deployment file somewhere in the archive. Instead of scanning all the files for changes Seam could only check this file.


      Thanks.