[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data structure lockin

Continuing the topic of data structures, I noticed a slowdown for the DNS 
performance after the recent conversion to cstruct.  While the memoized version 
(which caches marshalled packets) was about the same performance, the normal 
one was much slower (even worse than BIND).

Thomas did some profiling today, and it turns out that the use of a mutable 
Hashtbl for tracking label compression results in very bad performance, since 
the string lists all have hash collisions and ends up linearising the 
structure.  He converted it to use a purely functional Map instead (which just 
lives on the minor heap since it's only needed for one packet parse cycle), and 
performance is right back where it should be!


(mainly fyi for Mort, but useful for others too)




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.