Skip to content

Reduce memory usage of FSRSink

It's worth reviewing 8ec97adc separately as the other commit just removes the legacy implementation and the formatting ends up making the diff look more complex than it really is.

⚠️ The code is mostly LLM generated so bear that in mind.

Fixes #408 (closed) see #408 (comment 10357484) for a detailed explanation of the problem. To see the impact of it, using the test case from: #408 (comment 10354994)

Before:

iTerm2.Yh1mwz.test

After:

iTerm2.5AI5Lw.test

There are a few separate features of this fix:

  • Fix the memory leak from not deleting the std::string* containing the FSR that extracted from the TFile.
  • Replace the extracted_fsrs std::list with a callback patterrn instead
  • Use a callback on nlohmann::json::parse to deduplicate the DstData decoding keys before they're even allocated
  • Validate that every level of the FSR contains a guid key

To do

  • ci-test against lhcb-master
  • ci-test against lhcb-sim11
Edited by Chris Burr

Merge request reports

Loading