On Jan 9, 2008 1:09 PM, André Detsch <[EMAIL PROTECTED]> wrote:
> On Jan 6, 2008 4:08 AM, Michael Homer <[EMAIL PROTECTED]> wrote:
> > Hi,
> > As mentioned in the dev meeting, I'm redoing Freshen in Python so it
> > can use the system code as much as possible. I have an early draft
> > written (gets list of programs, orders and outputs them) that I've
> > checked in, but I'm not sure I'm doing everything the right way - in
> > particular, calling CheckDependencies to get the set of dependencies
> > seems like it might be inefficient. I've cut the time down for a graph
> > build to around 45s for me (was over 8 minutes, until I figured
> > passing the URL would help). Are there points I could be using the
> > tools code better?
>
> Hi Michael,
>
> First, I think the tsort2 function is not required, as
> CheckDependencies returns an already ordered list. So, it would, as I
> see, just a matter of concatenating the lists returned for
> CheckDependencies of each program to be updated (but avoiding
> redundancies while concatenating).
I did wonder about that. The ordering it produces is sufficient for a
single program at the root, but the performance of calling the
recursive CheckDependencies for every program on the system isn't good
(factorial time?). Building the graph and doing a topological sort
only requires a single shallow CheckDependencies for each program,
then a linear-time sort. I didn't understand the implications of all
the parameters, though, so I suspect I'm doing it a little naively.
> There are ways of improving the speed for multiple calls of
> CheckDependencies, but I have to take a better look on the code to
> figure out the best way to do it.
>
> Anyway, i think it would be good for us to discuss aspects of the code
> in IRC. I can then explain you better whats going on there, and we can
> discuss improvements, specially in regards to internal API, including
> the structures being used (there is certainly room for improvements,
> as things were added mostly incrementally, and we already have a lot
> more stuff that we had in the first days of GetAvailable). What is the
> best time for you? Weekend?
That sounds good. The weekend is fine, but I can fit in whenever works for you.
-Michael
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel