BIND 10 #192: Data source hotspot cache
BIND 10 Development
do-not-reply at isc.org
Sat Jun 26 01:15:05 UTC 2010
#192: Data source hotspot cache
-------------------------+--------------------------------------------------
Reporter: each | Owner: jinmei
Type: enhancement | Status: reviewing
Priority: major | Milestone: 05. 3rd Incremental Release: Serious Secondary
Component: b10-auth | Resolution:
Keywords: | Sensitive: 0
-------------------------+--------------------------------------------------
Comment(by each):
Replying to [comment:31 jinmei]:
> See the attached patch. This is what I'd do if I were to use std::list
for this purpose. This version doesn't have the performance problem you
raised.
If you're certain of that, then I have no objection.
I sort of disagree about the readability; I find the C-like version easier
to understand--but that's just because I understand C and don't really
understand STL very well. Take this, for example:
{{{
lru_.erase(node->lru_entry_);
lru_.push_front(node);
node->lru_entry_ = lru_.begin();
}}}
I accept your assurance that it does the right thing, but I would never
have guessed it did. An old iterator can be preserved through list state
changes and still be meaningful? I'm surprised to learn this, but if it
works, I'm happy with it.
--
Ticket URL: <http://bind10.isc.org/ticket/192#comment:32>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list