Community
Participate
Working Groups
in an internal application, we assemble a bundle-ized (RFC66 WAB) version of the atlassian JIRA WAR [1]. This is a 110 MB web bundle with ~45 MB worth of nested jars on the Bundle-Classpath (WEB-INF/lib/*.jar). A tycho build for a feature including this bundle takes ~15min every time just to extract the nested jars. The bug is that nested jar extraction, which is only needed for compilation, should not happen at all if the bundle is referenced from a feature only (or update site/repository for that matter). An enhancement which could make this bug less severe is that extraction could be optimized (extracted released artifacts could be assumed to be immutable, thus reused across builds) [1] http://www.atlassian.com/software/jira/download
I measured that the plexus ZipUnarchiver is much slower (at least the way we are using it with extraction paths) than plain java.util.ZipFile Will go back to java.util.ZipFile in DefaultBundleReader#getEntry()
(In reply to comment #0) > The bug is that nested jar extraction, which is only needed for compilation, > should not happen at all if the bundle is referenced from a feature only (or > update site/repository for that matter). Bug 364134 strives for a separation of concerns in the afterProjectsRead code, and this change would fit into this work.
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=85816c1f398e5ab7268d4769ccb1f1c8250f3a8f
just for the record: a typical stacktrace taken during ~15 min of zip extraction: "main" prio=6 tid=0x00eb9800 nid=0x2a64 runnable [0x0027f000] java.lang.Thread.State: RUNNABLE at java.io.RandomAccessFile.length(Native Method) at java.io.RandomAccessFile.skipBytes(RandomAccessFile.java:429) at org.codehaus.plexus.archiver.zip.ZipFile.resolveLocalFileHeaderData(ZipFile.java:440) at org.codehaus.plexus.archiver.zip.ZipFile.<init>(ZipFile.java:151) at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(AbstractZipUnArchiver.java:269) at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:127) at org.eclipse.tycho.core.osgitools.DefaultBundleReader.getEntry(DefaultBundleReader.java:208) at org.eclipse.tycho.core.maven.MavenDependencyInjector.newExternalDependencies(MavenDependencyInjector.java:116) at org.eclipse.tycho.core.maven.MavenDependencyInjector.addDependency(MavenDependencyInjector.java:95) at org.eclipse.tycho.core.maven.MavenDependencyInjector.injectMavenDependencies(MavenDependencyInjector.java:51) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.injectDependenciesIntoMavenModel(P2TargetPlatformResolver.java:447) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:98) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Created attachment 208607 [details] JIRA web archive bundle OSGi MANIFEST