On Nov 3, 2010, at 10:02 AM, Trevor Vaughan wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm cross-posting this to both the users and dev groups so that the
> users can use the workaround technique to reduce graph churn and the
> devs can hopefully fix the issue.
> 
> So, I'm loving stages, but they appear, by default, to generate a
> many-to-many dependency graph.
> 
> By adding 'pre' and 'post' stages that contain a single item, the graphs
> are vastly reduced in complexity and we're seeing something like a 3X
> speedup in graph execution in simple test cases.
> 
> I've attached a couple of puppet files illustrating the issue with their
> associated graphs.
> 
> If the graphs could be auto-reduced to a single point prior to execution
> automatically, it would be quite helpful.

Thanks a ton for tracking this down.

Unfortunately, I don't think it's as clear as your pictures make it seem.  
Which graphs are these pictures produced from?

There are three graphs you might reasonably look at - the normal, 
pre-relationship graph which has just containment edges (I think this is 
normally called resources.dot), the graph with just the relationships 
(relationships.dot, I think), and the essentially multiplied graph of 
dependency times containment edges (not sure what this is called).

The latter will generally be a many to many graph, and I think that's what 
you're using.  The reason it's not in the case of your transitions version is 
that we had to keep those class objects in there (we would normally remove 
them) because if we didn't then certain kinds of dependencies got missed.

So basically, this isn't so much a feature as the side-effect of an ugly hack 
to a bug.

I think the right answer is to get rid of the need for this graph at all by 
having a single graph contain both dependency and containment edges, thus not 
needing the many to many nature.  I tried very hard to get this into 2.6 but 
couldn't finish it in time.  In seeing this multiplier, it's probably 
justification to raise the priority on this, which doesn't hurt my feelings at 
all.

For those interested in the code, it's in my 
refactor/master/3691-no_relationship_graph branch but is likely no longer in a 
mergeable state.

-- 
The easiest way for your children to learn about money is for you
not to have any.    -- Katharine Whitehorn
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to