> First: In my case, url regexp matching drowns out everything else (90%).

That I know.  If you benchmark Polipo, don't use a forbidden file.  If
you run a busy Polipo, don't put regexps in your forbidden file.

It might be possible to fix this inefficiency by using a DFA-based
rexexp matcher, but the only one I know is the one by Jérôme Vouillon,
and it's written in Caml.

> Secondly, 85% of all calls to timeval_cmp differ in tv_sec, so that's correct.

Fine.

> Now, 90% of the calls to timeval_cmp come from enqueueTimeEvent. That function
> walks the event queue to find the right place for a new event. It does it in
> this order:
> - try front of queue (33% satisfied in this attempt)
> - try back of queue  (*never* satisfied in this attempt, out of >60000 calls)
> - walk from last-1 and forwards (67% satisfied, average walk 1.25 places)

Interesting.

> The surprise is that the back-of-queue never triggers.

Very interesting info.

> There is perhaps some long-time event that was enqueued before any
> others that is hogging this spot?

I suspect it's the periodic write-out from the in-memory cache.

> I'm not sure how to use this information, but it may be possible to
> shave off 20-30% of the calls to timeval_cmp by somehow
> special-casing this.

I'll do that, then.

                                        Juliusz

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to