tor/changes/ticket27225
Nick Mathewson 6d93820499 Memoize summarize_protover_flags()
Our tests showed that this function is responsible for a huge number
of our malloc/free() calls.  It's a prime candidate for being
memoized.

Closes ticket 27225.
2018-11-07 10:47:07 -05:00

6 lines
292 B
Plaintext

o Minor features (performance):
- Avoid parsing the same protocol-versions string over and over
in summarize_protover_flags(). This should save us a huge number
of malloc calls on startup, and may reduce memory fragmentation with
some allocators. Closes ticket 27225.