Community
Participate
Working Groups
The Ant view is very slow upon first/initial load (during the start of Eclipse or if the Ant view is displayed the first time). This gets worse the more build files are added. The added build files are between 25k and 60k bytes, most of them can be found in the JVx project: https://sourceforge.net/projects/jvx/ . Sorry for the sparse information, I am happy to provide more information, but I don't know what exactly you need to know.
The Ant view opens immediately for me using http://download.eclipse.org/eclipse/downloads/drops4/S-4.6M6-201603170200/ Can you still see this with above build, or a newer one? If so, please make some stack traces and attach them here. For details see https://wiki.eclipse.org/How_to_report_a_deadlock#Getting_a_stack_trace_on_Windows
Yes, I'm still seeing this in the specified build. When I add the build files from the JVx family I'm looking at a load time of 40+ seconds for the Ant view. The worst offender is the build file from the JVx.help project (https://sourceforge.net/projects/jvxonlinehelp/), which itself takes 20+ seconds to load in the Ant view. I do not believe that it is a deadlock, it returns "after some time" and I could not detect a deadlock in jconsole. I additionally looked at Eclipse with jvisualvm and I could neither see a lot of CU, memory or GC activity. What I did see, though, is that a lot of time is spent in the following methods: org.apache.tools.ant.taskdefs.condition.Socket.eval() org.apache.tools.ant.taskdefs.condition.Http.eval() With (most) build files containing (with the "x" being placeholders): <target name="proxy.check"> <condition property="proxy.enabled"> <and> <socket server="x.x.x.x" port="xxxx"/> </and> </condition> </target> <target name="proxy" depends="proxy.check" if="proxy.enabled"> <property name="proxy.host" value="x.x.x.x"/> <property name="proxy.port" value="x"/> <property name="proxy.user" value=""/> <property name="proxy.pass" value=""/> <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.password}"/> </target> So from what I can gather is that the Ant view is, in one way or another, evaluating the different targets and triggers the proxy check. That leads to the slowdown, because the proxy does not work from the machine at which I'm sitting. Ahrm, okay, from here I'm uncertain if this is an Eclipse bug *at all*. Ideally the Ant view would not execute anything in the build file but rather just parse it to get the target names, but I do not know enough about the internals of Ant, the Ant view or Eclipse to make a profound statement about this.
Robert, please provide the stack traces as per comment 1.
Created attachment 260843 [details] Threaddump taken when adding a build file to the Ant view.
Created attachment 260844 [details] Threaddump taken when adding a build file to the Ant view.
Created attachment 260845 [details] Threaddump taken during startup of Eclipse with a populated Ant view.
Created attachment 260846 [details] Threaddump taken during startup of Eclipse with a populated Ant view.
Sarika, please have a look.
I've attached a few threaddumps. "Adding" was taken when adding a build file to the Ant view. "Starting" was taken when Eclipse is starting (with build files added to the Ant view and the Ant view by default visible in the perspective). All four threaddumps were taken while Eclipse was frozen for 10+ seconds.
Thanks Robert for providing the dumps, I will be looking at them.
This works for me using http://download.eclipse.org/eclipse/downloads/drops4/S-4.8M3a-201710300400/ If you still see this, please reopen with detailed steps.