NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
49.06k stars 5.65k forks source link

Improve ClassSearcher.search performance #6655

Closed astrelsky closed 1 week ago

astrelsky commented 1 week ago

This improves the ClassSearcher search performance by about 50% by using virtual threads to do the file IO in parallel. You can read/write multiple files at the same time as well as read/write to different parts of the same file at the same time. The JVM will schedule the file IO accordingly and you can process other data while the virtual threads waiting for file IO are blocked.

Edit: There are a few problems with this. It turns out it only helps when reading from the jar files and the improvement isn't worth the effort.