summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2025-07-09 19:04:30 -0700
committerMark Rowe <mark@vector35.com>2025-07-10 16:13:22 -0700
commit55d3bda18a8f929d19557ec0d215eef66c68506b (patch)
tree8ebd3431a18eca0b5bc5cb6d6f4e1ea62b3616f7 /python/binaryview.py
parent83684ec8fd3aae8a4db3f0d35251677fd82954ac (diff)
[DSC] Performance improvements and clean-up in SymbolTableView
Avoid copying the vector of symbols where possible. When no filter string is applied we no longer copy the entire vector symbols by having the symbols used for display be indirected via a pointer. It points either to the unfiltered symbols or the filtered symbols. Some unncessary copies have been removed by using `std::move` where appropriate. Filtering has been updated to avoid `std::vector::reserve` / `std::vector::shrink_to_fit` in favor of letting the filtered vector control its own growth and reuse its buffer. This avoids allocating a ~100MB buffer every time we update the filter only to later reallocate and move the contents into a smaller buffer. Instead the buffer grows via `std::vector`'s usual growth algorithm and it is preserved across filter calls to avoid unnecessarily reallocating it, and only shrink the buffer if it has shrunk significantly vs previous iterations.
Diffstat (limited to 'python/binaryview.py')
0 files changed, 0 insertions, 0 deletions