binsync / libbs

A library for writing plugins in any decompiler: includes API lifting, common data formatting, and GUI abstraction!
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Cache binary_base_addr #90

Closed mahaloz closed 1 month ago

mahaloz commented 2 months ago

Closes #78

TODO:

Important Findings

After doing some measuring, it turns out that requesting the base addr through IDA Proj idaapi.get_baseaddr(), usually took 0.002 seconds, which is great. So great, in fact, that the complexity of writing a normal handler for baseaddr changes was undeeded. I've saved that progress in the https://github.com/binsync/libbs/tree/feat/ida_baseaddr_callback branch if it's ever needed again.

Similarly, the Binja and angr native Python APIs are very fast. Only Ghidra needed a real caching system to keep up with speed, so this PR only does that.

After this change, we should be seeing another big speedup in dumping of mass functions, since the baseaddr was always requested when using these APIs.