| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of ruby bug:
http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886
and
http://redmine.ruby-lang.org/issues/show/1331
YAML dump of hashes using ruby objects as keys is incorrect leading
to an error when deserializing the YAML in puppetd.
The error is easy to correct by a post-process fix-up of
the generated YAML, which transforms:
&id004 !ruby/object:Puppet::Relationship ?
to the correct:
? &id004 !ruby/object:Puppet::Relationship
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
|
|
|
|
|
|
| |
If we don't do this, there's a chance we'll get hit
by the ruby yaml bug again.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
Unfortunately, again because of a Ruby bug
(http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886)
Ruby can't print yaml that it can read, if custom
classes are used as keys in hashes, which Sets use internally.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
It was previously recursive, and was causing
significant performance problems for large, wide
graphs.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
This can cause a huge speedup for large numbers of edges.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The way this class was testing edges was
causing them to appear adjacencies to appear magically,
because it was only testing that a hash had a key, not that
the value had any edges.
This fixes the infinite recursion mentioned in #2111.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
semicolons
|
|
|
|
|
|
|
| |
Again, necessary so that the class can be dumped
in Marshal or YAML.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
This class is a holdover from when I was using GRATR, and it's
obsolete now.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
| |
the in-degree sometimes resulted in a lower number than the
number of in-edges.
|
|
|
|
| |
removing the bangs from 'add_vertex!' and 'add_edge!'.
|
|
|
|
| |
from the system, and implemented my own topsort method.
|
|
|
|
| |
and I had to make a few small changes to make them work.
|
|
|
|
|
|
| |
to Puppet::SimpleGraph, which should dramatically enhance
performance. It should be largely functionally equivalent,
with the only difference being that edges are no longer deduplicated.
|
|
is just too slow. This class has just about no iteration,
and vertex deletation is dramatically (as in, 1000x) faster).
Here are the results of some very simplistic graph operations:
Vertex tests (add and remove 1000 vertices):
gratr: Add: 0.01; Remove: 9.70
simple: Add: 0.02; Remove: 0.01
Edge tests (add and remove 1000 edges):
gratr: Add: 0.02; Remove: 0.03
simple: Add: 0.07; Remove: 0.02
I expect I can get the cost of the edge addition down some, but even
as it is, it's a couple of orders of magnitude faster.
This doesn't even count things like searching, which I did some other
testing on and got consistently faster results (somewhere between 1.5x and
1500x faster, depending on how the test was set up and how big the graph was).
|