Quoting "Michael Andres"
On Thursday 09 September 2010 17:06:18 Ricardo Cruz wrote:
Very nice, thanks. Please just add there a comment on the performance of the function, otherwise people may unnecessarily abuse it. I assume it's O(N): you iterate through the logs every time the function is called.
No, the history file is parsed once on demand, and the cache (hash<int>) is invalidated after a commit. So it should not perform that bad.
Very cool. But it's not obvious from the comment, so I'd append to the comment something like "(cached after first run)". Cheers, Ricardo ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org