redballoonsecurity / ofrak

OFRAK: unpack, modify, and repack binaries.
https://ofrak.com
Other
1.82k stars 128 forks source link

RFE: add custom gc thresholds to speed things up. #471

Open ANogin opened 1 month ago

ANogin commented 1 month ago
    t0, t1, t2 = gc.get_threshold() # AN: returns 700, 10, 10 in my environment
    gc.set_threshold(max(t0, 10240), max(24,t1), max(25, t2))

on one long-running example results in 10% speedup for me..

Which files would be affected? TBD - not sure where this is best to go

Does the proposed maintenance include non-doc string functional changes to the Python code? Yes.

Are you interested in implementing it yourself? Trivial to implement, but somebody (not just me) should probably collect more perf examples (maybe on a range of different machines/OSs?) so that we can figure out optimal values in at least somewhat systematic way