Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.6
    • Fix Version/s: 1.1.0
    • Component/s: Jetty
    • Labels:
      None
    • Complexity:
      Intermediate
    • Tested on JDKs:
      1.6.0_23-b05 Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      The jetty deployer servlet isn't buffering the I/O streams, which cause the deploying to be very slow (especially locally, when testing).

        Activity

        Hide
        Jerome Lacoste added a comment -

        I tested with the jetty 7 deployed, not with the 6 one. Patch is identical and build pass so I guess it works.

        Show
        Jerome Lacoste added a comment - I tested with the jetty 7 deployed, not with the 6 one. Patch is identical and build pass so I guess it works.
        Hide
        Jerome Lacoste added a comment -

        For information, deploying locally was extremely slow before this patch: 6 minutes for a 11M webapp.
        And I used to see lots of

        java.io.EOFException: Unexpected end of ZLIB input stream
        at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:154)
        at java.util.jar.JarInputStream.read(JarInputStream.java:177)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:78)
        at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:118)
        at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:149)
        at org.eclipse.jetty.util.resource.JarResource.copyTo(JarResource.java:151)
        at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:508)
        at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:49)
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:465)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:495)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339)
        at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:291)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

        After the patch, the copying takes less than one second (still locally).

        Show
        Jerome Lacoste added a comment - For information, deploying locally was extremely slow before this patch: 6 minutes for a 11M webapp. And I used to see lots of java.io.EOFException: Unexpected end of ZLIB input stream at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at java.util.zip.ZipInputStream.read(ZipInputStream.java:154) at java.util.jar.JarInputStream.read(JarInputStream.java:177) at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100) at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:78) at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:118) at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:149) at org.eclipse.jetty.util.resource.JarResource.copyTo(JarResource.java:151) at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:508) at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:49) at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:465) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:495) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50) at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339) at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:291) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) After the patch, the copying takes less than one second (still locally).
        Hide
        Savas Ali Tokmen added a comment -

        Hello

        Thank you for the patch, looks good. Would you like to commit it yourself?

        Cheers

        Show
        Savas Ali Tokmen added a comment - Hello Thank you for the patch, looks good. Would you like to commit it yourself? Cheers
        Hide
        Jerome Lacoste added a comment -

        > Thank you for the patch, looks good. Would you like to commit it yourself?

        I could if I was registered as committer.

        Show
        Jerome Lacoste added a comment - > Thank you for the patch, looks good. Would you like to commit it yourself? I could if I was registered as committer.
        Hide
        Jerome Lacoste added a comment -

        $ svn commit -m "CARGO-884 speed up jetty remote deployer by using Buffered*putStreams"
        Sending jetty-6-and-earlier-deployer/src/main/java/org/codehaus/cargo/deployer/jetty/DeployerServlet.java
        Sending jetty-7-and-onwards-deployer/src/main/java/org/codehaus/cargo/deployer/jetty/DeployerServlet.java
        Transmitting file data ..
        Committed revision 2646.

        Not sure if this goes in 1.0.7 or 1.1.0. POM says 1.1.0-SNAPSHOT, Jira has 1.0.7 as next release.

        Show
        Jerome Lacoste added a comment - $ svn commit -m " CARGO-884 speed up jetty remote deployer by using Buffered*putStreams" Sending jetty-6-and-earlier-deployer/src/main/java/org/codehaus/cargo/deployer/jetty/DeployerServlet.java Sending jetty-7-and-onwards-deployer/src/main/java/org/codehaus/cargo/deployer/jetty/DeployerServlet.java Transmitting file data .. Committed revision 2646. Not sure if this goes in 1.0.7 or 1.1.0. POM says 1.1.0-SNAPSHOT, Jira has 1.0.7 as next release.
        Hide
        Anders Hammar added a comment -

        You committed on trunk, so it's for 1.1.0. 1.0.7 is a branch (that we try to avoid using).

        Show
        Anders Hammar added a comment - You committed on trunk, so it's for 1.1.0. 1.0.7 is a branch (that we try to avoid using).

          People

          • Assignee:
            Jerome Lacoste
            Reporter:
            Jerome Lacoste
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: