Skip to content
Snippets Groups Projects
Commit 02a65078 authored by Nick Mathewson's avatar Nick Mathewson :game_die: Committed by Roger Dingledine
Browse files

Fix O(n^2) performance when parsing a big pile of extrainfos

We were doing an O(n) strlen in router_get_extrainfo_hash() for
every one we tried to parse.  Instead, have
router_get_extrainfo_hash() take the length of the extrainfo as an
argument, so that when it's called from
extrainfo_parse_from_string(), it doesn't do a strlen() over the
whole pile of extrainfos.
parent 62f8e392
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment