www-builds mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Saving job configuration still extremely slow
Date Tue, 21 Sep 2010 20:41:51 GMT
Ouch.  It sounds like the easiest optimization would be to not do this
computation if the dependencies for the current job have not changed.

That would be easier than doing the correct thing which would be to
propagate simply changes until the system reaches something unchanged.

On Tue, Sep 21, 2010 at 1:37 PM, Niklas Gustavsson <niklas@protocol7.com>wrote:

> On Tue, Sep 21, 2010 at 9:44 PM, Niklas Gustavsson <niklas@protocol7.com>
> wrote:
> > On Tue, Sep 21, 2010 at 5:52 PM, Jesse Glick <jesse.glick@oracle.com>
> wrote:
> >> I had thought this was just a problem with the old Hudson installation,
> but
> >> it is still true: clicking "Save" from a job's /configure screen takes
> >> several minutes before the job's main page is loaded again. This should
> only
> >> take a second or two. Maybe someone can trace what is taking so long?
> >
> > It's on my todo list, but I haven't yet looked into it.
>
> Thread dumping a few job configuration saves, the all sit on this
> stacktrace (even non-Maven builds):
>
> "Handling POST /hudson/job/Ant_JDK_1.4/configSubmit : http-8090-40"
> daemon prio=10 tid=0x0000000041940800 nid=0x46a4 runnable
> [0x00007f2fa6721000]
>   java.lang.Thread.State: RUNNABLE
>        at java.lang.String.intern(Native Method)
>        at hudson.maven.ModuleDependency.<init>(ModuleDependency.java:48)
>        at hudson.maven.ModuleDependency.<init>(ModuleDependency.java:54)
>        at hudson.maven.MavenModule.asDependency(MavenModule.java:296)
>        at
> hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:385)
>        at
> hudson.maven.MavenModuleSet.buildDependencyGraph(MavenModuleSet.java:487)
>        at hudson.model.DependencyGraph.<init>(DependencyGraph.java:100)
>        at hudson.model.Hudson.rebuildDependencyGraph(Hudson.java:3346)
>        at
> hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:588)
>        at sun.reflect.GeneratedMethodAccessor1225.invoke(Unknown Source)
> ...
>
>
> Looking into the code, what this does is that the last thing Hudson do
> on saving a job configuration is to recalculate the dependency graph
> between all jobs. The DependencyGraph code warns that this is slow,
> looks like it will loop over all jobs which in turn will loop over all
> jobs... And in our pretty large environment, this adds up pretty fast.
> If anyone got any idea, besides asking the Hudson devs to optimize
> this code, feel free to speak up :-)
>
> /niklas
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message