summaryrefslogtreecommitdiff
path: root/changes
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-10 17:27:16 -0400
committerRoger Dingledine <arma@torproject.org>2012-05-10 17:41:31 -0400
commit02a650786b21e4f3c255d686a3b5df875b2d66b5 (patch)
treea313aa8848622dfa7fcb3bdd6fc7630002b48ae5 /changes
parent62f8e3926d62ff4aaefedfe89355f04f3a8d74fa (diff)
downloadtor-02a650786b21e4f3c255d686a3b5df875b2d66b5.tar.gz
tor-02a650786b21e4f3c255d686a3b5df875b2d66b5.zip
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.
Diffstat (limited to 'changes')
-rw-r--r--changes/bug58283
1 files changed, 3 insertions, 0 deletions
diff --git a/changes/bug5828 b/changes/bug5828
new file mode 100644
index 0000000000..3a1734d01b
--- /dev/null
+++ b/changes/bug5828
@@ -0,0 +1,3 @@
+ o Minor bugfixes (performance):
+ - Avoid O(n^2) performance characteristics when parsing a large
+ extrainfo cache. Fixes bug 5828; bugfix on 0.2.0.1-alpha.