
On 5/12/12 8:52 AM, Sönke Hahn wrote:
Any comments or suggestions?
Cabalize it and release it on Hackage. But especially the cabalization part :) You should probably farm out the toDot rendering to one of the libraries that focuses on that[1], since they'll have focused on the efficiency issues--- or if they haven't, then you can contribute improvements there, helping everyone win. In particular, you're using Strings which is a notorious performance sink. Using Text or ByteStrings would be far better. Also, have you compared your transitive reduction to just outputting the whole graph and then using `tred`? The latter approach has the distinct downside of needing to serialize the whole graph; but it could still be a win unless you intend to implement similar algorithms yourself. The smart algorithms do *much* better than brute force. And of course it'd be nice to be able to pass arguments to the program in order to filter and otherwise manipulate the resulting graph. A lot of that can be done by special programs which only know about the Dot language (e.g., tred), so you should only focus on things which aren't captured by the Dot language or are otherwise only knowable by querying Darcs. [1] Like graphviz or language-dot: http://hackage.haskell.org/package/graphviz http://hackage.haskell.org/package/language-dot Though it doesn't look like those are used by the various other foo2dot programs on Hackage: http://hackage.haskell.org/package/hs2dot http://hackage.haskell.org/package/prof2dot http://hackage.haskell.org/package/scons2dot http://hackage.haskell.org/package/vacuum-cairo http://hackage.haskell.org/package/vacuum-opengl So perhaps there's some issue with those libraries... -- Live well, ~wren