Bug 6948 - New builder - builder does not reuse opened JARs
Summary: New builder - builder does not reuse opened JARs
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-14 11:11 EST by Philipe Mulet CLA
Modified: 2002-01-11 08:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-12-14 11:11:46 EST
From an EC discussion, it appears that the new builder isn't efficiently 
dealing with JAR classpath entries.

"ni bin" <nibin@xtime.com> wrote in message news:9vbfim$lk$1@rogue.oti.com...
> Following is the stack trace. It paused at playing with external jar/zip
> files. I tried in 1107 again with same workspace and same file. It is too
> quick to print the stacktrace. I have 20 external jar files. My guess is in
> 1107 the exteranl jar files are cached so you don't need to parse them in
> basic build.
> 
> Do you think it will be better if I import all jar files into workspace? I
> will try it out anyway.
> 
> Thx and Rgds
> 
> Bin
> 
> Full thread dump:
> 
> "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2
> tid=0x8b7fb10 n
> id=0x78c waiting on monitor [0x9d1f000..0x9d1fdc4]
>         at java.lang.Object.wait(Native Method)
>         at
> org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread
> .run(AbstractReconciler.java:128)
> 
> "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2
> tid=0x8f3f9b0 n
> id=0x9d8 waiting on monitor [0x9cdf000..0x9cdfdc4]
>         at java.lang.Object.wait(Native Method)
>         at
> org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread
> .run(AbstractReconciler.java:128)
> 
> "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2
> tid=0x8edfeb8 n
> id=0x75c waiting on monitor [0x9c9f000..0x9c9fdc4]
>         at java.lang.Object.wait(Native Method)
>         at
> org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread
> .run(AbstractReconciler.java:128)
> 
> "Java indexing" daemon prio=5 tid=0x8e67b58 nid=0x854 waiting on monitor
> [0x9a6f
> 000..0x9a6fdc4]
>         at java.lang.Thread.sleep(Native Method)
>         at
> org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobMan
> ager.java:255)
>         at java.lang.Thread.run(Thread.java:484)
> 
> "Signal Dispatcher" daemon prio=10 tid=0x894e18 nid=0x6f0 waiting on monitor
> [0.
> .0]
> 
> "Finalizer" daemon prio=9 tid=0x7efcc8 nid=0x988 waiting on monitor
> [0x8c4f000..
> 0x8c4fdc4]
>         at java.lang.Object.wait(Native Method)
>         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
>         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
>         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
> 
> "Reference Handler" daemon prio=10 tid=0x8990c78 nid=0x53c waiting on
> monitor [0
> x8c0f000..0x8c0fdc4]
>         at java.lang.Object.wait(Native Method)
>         at java.lang.Object.wait(Object.java:420)
>         at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
> 
> "main" prio=5 tid=0x234ae0 nid=0x7d8 initialized [0x6e000..0x6fc3c]
>         at java.util.zip.ZipFile.getNextEntry(Native Method)
>         at java.util.zip.ZipFile.access$300(ZipFile.java:29)
>         at java.util.zip.ZipFile$2.nextElement(ZipFile.java:295)
>         at
> org.eclipse.jdt.internal.core.newbuilder.ClasspathJar.buildDirectoryS
> tructure(ClasspathJar.java:34)
>         at
> org.eclipse.jdt.internal.core.newbuilder.ClasspathJar.<init>(Classpat
> hJar.java:25)
>         at
> org.eclipse.jdt.internal.core.newbuilder.ClasspathLocation.forLibrary
> (ClasspathLocation.java:21)
>         at
> org.eclipse.jdt.internal.core.newbuilder.NameEnvironment.computeLocat
> ions(NameEnvironment.java:130)
>         at
> org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.initializeBuilde
> r(JavaBuilder.java:240)
>         at
> org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.build(JavaBuilde
> r.java:58)
>         at
> org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
> :356)
>         at
> org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatfo
> rm.java:821)
>         at org.eclipse.core.runtime.Platform.run(Platform.java:395)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> .java:114)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> .java:179)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> .java:189)
>         at
> org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
> :138)
>         at
> org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatfo
> rm.java:821)
>         at org.eclipse.core.runtime.Platform.run(Platform.java:395)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> .java:152)
>         at
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java
> :214)
>         at
> org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.
> java:701)
>         at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1237
> )
>         at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOp
> eration.java:78)
>         at
> org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(Abs
> tractTextEditor.java:1457)
>         at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performS
> aveOperation(CompilationUnitEditor.java:581)
>         at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(C
> ompilationUnitEditor.java:629)
>         at
> org.eclipse.ui.internal.EditorManager$9.run(EditorManager.java:785)
>         at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont
> ext.java:296)
>         at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
>         at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDi
> alog.java:335)
>         at
> org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(Edi
> torManager.java:643)
>         at
> org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:7
> 90)
>         at
> org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1
> 309)
>         at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:32)
>         at org.eclipse.jface.action.Action.runWithEvent(Action.java:452)
>         at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
> (ActionContributionItem.java:407)
>         at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(Act
> ionContributionItem.java:361)
>         at
> org.eclipse.jface.action.ActionContributionItem.access$0(ActionContri
> butionItem.java:352)
>         at
> org.eclipse.jface.action.ActionContributionItem$ActionListener.handle
> Event(ActionContributionItem.java:47)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54)
>         at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:635)
>         at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1368)
>         at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1170)
>         at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:775)
>         at org.eclipse.ui.internal.Workbench.run(Workbench.java:758)
>         at
> org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoa
> der.java:820)
>         at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
>         at org.eclipse.core.launcher.Main.run(Main.java:502)
>         at org.eclipse.core.launcher.Main.main(Main.java:362)
> 
> "VM Thread" prio=5 tid=0x853b28 nid=0x97c runnable
> 
> "VM Periodic Task Thread" prio=10 tid=0x894ce0 nid=0x960 waiting on monitor
> 
> 
> "Philippe Mulet" <philippe_mulet@oti.com> wrote in message
> news:9vba0h$uo1$1@rogue.oti.com...
> > Unclear what's going on here. Given the progress message, I would say it
> > happens right before the Java builder kicks in (during the platform
> > invokation phase). Just to confirm this, could you run Eclipse with a
> > console open (-consoleLog) and when you see the pause, please perform a
> > Ctrl+Pause inside the console window to obtain a stack dump of the VM
> > activity.
> >
> > This would indicate what is running when the pause occurs. I haven't heard
> > of any similar report so far.
> > Please feel free to log the stack dump inside a bug report so we can
> > investigate it.
> >
> > "ni bin" <nibin@xtime.com> wrote in message
> > news:9vb6t3$tjt$1@rogue.oti.com...
> > > Any Java file and it is in auto-build,  I guess. It stop at "Invoke Java
> > > Builder on /project" 3 seconds. In 1107,
> > > it took less than one second.
> > >
> > > "Philippe Mulet" <philippe_mulet@oti.com> wrote in message
> > > news:9v9v3u$dj0$1@rogue.oti.com...
> > > > Any file ? Are you in auto-build ?
> > > >
> > > > "ni bin" <nibin@xtime.com> wrote in message
> > > > news:9v960a$7ts$1@rogue.oti.com...
> > > > > It becomes slower than 1107 when save the changes. Is there any
> option
> > > to
> > > > > speed it up.
> > > > >
> > > > > Rgds
> > > > >
> > > > > Bin
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> 
>
Comment 1 Kent Johnson CLA 2001-12-17 14:02:49 EST
Now only opens the jar when it needs it.

This eliminates the delay on all dependent projects which has no work to do.