Danek and I both noticed that, with 200,000+ actions on a system, action
creation (from string --> action object) is actually showing up in our
performance profiling.  It's not a massive problem, but it's there.

Here's my attempt at a performance rewrite.  On my AMD64 system I'm
seeing the time it takes to create 100,000 actions drop from about
7.7secs to about 4.1secs.  So we're up to about 25,000 actions/sec.

The key was to accumulate the action into dictionary all at one, instead
of using intermediate lists.

I also fixed a number of irritating bugs in the parsing, and wrote
a simple benchmarker, and a set of test cases.

Bart and I both agree that if we need more performance, the next
step will be to write action_string -> attribute_dictionary in C--
I would guess that we can probably get at least another doubling.

The pareser is still not perfect-- but it's better than it was.  I
think it'll be hard to keep things fast and make them more correct
than this, without going to C.

Your comments welcome.

        http://cr.opensolaris.org/~dp/ips-actions/

Thanks,

        -dp

-- 
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to