radareorg / r2retdec

RetDec plugin for Radare2
https://retdec.com/
MIT License
125 stars 24 forks source link

Provide caching of RetDec's output #13

Closed bannsec closed 4 years ago

bannsec commented 4 years ago

It would be helpful to have caching in place. For large files, running pdz is expensive. If it is re-run and nothing in sdb has changed, i'd assume it's safe to return existing results. Similarly, if only some relevant data in sdb has changed, there's possibly ways to improve decompilation performance by recognizing only those differences.

xkubov commented 4 years ago

Thank you for the proposal and I agree with you that the decompilation by RetDec is an expensive operation. I as well think that the output should be cached.

From what I saw the caching is available out of the box in Radare2 visual panels.

But as you write when used in the console the caching may really come handy. I think that the caching, however, should be optional. We should have this in the next release as well and meanwhile, I think we can discuss in here what we expect from the design and caching itself.

xkubov commented 4 years ago

After decompilation with pdz plugin caches output. New decompilation is triggered only after changes of info in Radare2.