Lazy loading of Ant build files is annoying
The lazy loading of Ant build files is annoying. My build target shortcut keys don't work until I open the Ant toolwindow after loading the project. I've filed a JIRA issue about this already: http://www.jetbrains.net/jira/browse/IDEA-12906
Why can't the Ant build files be loaded during project load?
Remember, you can't Develop with Pleasure if you are constantly being pricked by little pins.
Please sign in to leave a comment.
+1
"Gordon Tyler" <gordon.tyler@quest.com> wrote in message
news:12622841.1190042514039.JavaMail.itn@is.intellij.net...
>
>
Lazy loading isn't the problem in itself, but of course keyboard shortcuts should work.
The big problem is that loading ant files in Selena is much too slow. I am the guy
who complained about much longer startup time when ant files were still loaded at startup.
JetBrains can't boast about improved startup time when project loading in fact takes twice
the time it did in Demetra (I was having about a dozen build files at that time - some people
even have a lot more). It seems it wasn't possible to make ant file parsing faster, so they
decided to do it lazily.
I do not really see how parsing a couple of xml files can be made to take that long, but
obviously it uses such a complicated process that there's no easy performance fix.
Gordon Tyler wrote:
I am not particularly opposed to the lazy loading of the ant files. But I was quite shocked the first time I reopened a project and saw a message like "no ant files associated with this project" in the Ant window. While I was sitting in frustration and thinking "oh, shit! all my build settings are lost!", IDEA loaded the ant file in background and displayed a list of targets.
This was not a particularly pleasant user experience. It would be nice to
1) indicate that the settings are being loaded
2) don't wait until I open the ant tool window to load the associated ant file
I've noticed this also, i.e. I click on Ant Tool window after startup and initially the window is blank!!
Jetbrains needs to polish this up. They should show each build.xml file in the Ant Tool window and then show the load progess underneath. Would be nice to use multi-threaded also to take advantage of multiple cores. (Although should only use multi-threads if you wait util user clicks Ant Tool window to load. If you are going to load in background at startup, then only use single thread.)
+ build.xml
(%) Loading...
+ build2.xml
(%) Loading...
+ build3.xml
(%) Loading...
etc.
They can, but it will make project opening slower. In order for the project to be opened as soon as possible, we've made ant files
lloading lazy.
--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Not to be rude or anything, but it's pretty sad that parsing an XML file makes project loading that much slower...
I don't think that's really fair.
While a proper Ant build.xml file is well-formed XML, there is not a single schema (of any variety) or DTD defining a valid build.xml, since Ant is highly extensible.
So I find it unsurprising that proper analysis of an Ant file is costly.
Randall Schulz
My point is that for the Ant Build toolwindow all it needs is a list of targets. How slow can it be to parse an XML file to find all the target elements and grab their names?
Currently, when the loading of the ant config file is triggered by opening the Ant Build toolwindow, it doesn't take very long. Something along the order of 5 seconds I think. And we have fairly large and complex build files. I don't see how this could be considered a significant proportion of project loading time.
If the shortcut keys for build targets triggered loading of the build files and then triggered the build target, I wouldn't really be complaining since the loading time is not the issue. It's that every single damn day I get caught out by the build shortcut key not working the first time after I load the project. I've been working this way with build shortcut keys for years and I'm not about to change it for no good reason.
On 2007-10-03 02:45:36 +0400, Gordon Tyler <gordon.tyler@quest.com> said:
Getting list of targets includes processing imported files. Imported
files might be referenced using defined ant properties, so these must
be resolved as well. It's not that simple as it seems.
There has to be a middle ground. It is not "developing with pleasure" when
you hit your shortcut key to do a build and nothing happens. Then you have
to open the Ant window just to get the build file parsed then hit your
shortcut key (or double-click the target).
"Maxim Shafirov" <max@jetbrains.com> wrote in message
news:fdu7to$i17$1@is.intellij.net...
>
>> My point is that for the Ant Build toolwindow all it needs is a list of
>> targets. How slow can it be to parse an XML file to find all the target
>> elements and grab their names?
>>
>> Currently, when the loading of the ant config file is triggered by
>> opening the Ant Build toolwindow, it doesn't take very long. Something
>> along the order of 5 seconds I think. And we have fairly large and
>> complex build files. I don't see how this could be considered a
>> significant proportion of project loading time.
>>
>> If the shortcut keys for build targets triggered loading of the build
>> files and then triggered the build target, I wouldn't really be
>> complaining since the loading time is not the issue. It's that every
>> single damn day I get caught out by the build shortcut key not working
>> the first time after I load the project. I've been working this way with
>> build shortcut keys for years and I'm not about to change it for no
>> good reason.
>
On 2007-10-03 00:12:48 +0400, "Brad L." <no@no.no> said:
This is indeed a bug. The progress dialog like (Loading ANT
configurations) must be shown and target launched when everything is
loaded.
Please file a JIRA issue.
On 2007-10-03 00:25:22 +0400, Maxim Shafirov <max@jetbrains.com> said:
>> There has to be a middle ground. It is not "developing with pleasure" when
>> you hit your shortcut key to do a build and nothing happens. Then you have
>> to open the Ant window just to get the build file parsed then hit your
>> shortcut key (or double-click the target).
Sorry, I see now the issue exists.
IDEA can be lazy about loading Ant stuff, but after the project is loaded, it should immediately kick off loading Ant stuff in the background, so that Ant users don't have to wait when they click the Ant tab or the press an Ant shortcut. This would give you the lazy loading without a introducing a usability problem for Ant users where there was no problem before.
Sounds good to me.
All you would have to do when the project is opening is find the targets.
You don't have to verify the whole file until the user opens it (i.e. - view
source).
"Gordon Tyler" <gordon.tyler@quest.com> wrote in message
news:10042942.1191422733570.JavaMail.itn@is.intellij.net...