LIEF icon indicating copy to clipboard operation
LIEF copied to clipboard

Lazy loading to improve LIEF parsing performance

Open Wenzel opened this issue 5 years ago • 0 comments

Describe the bug LIEF parsing tend to be very slow on huge binaries. For example printing whether pandoc binary (118 MB) has NX takes 48 seconds ! :fearful:

To Reproduce Steps to reproduce the behavior:

  • apt-get install pandoc
  • time python -c "import lief; binary = lief.parse('/usr/bin/pandoc'); print(binary.has_nx)"

Capture d’écran de 2020-07-20 22-38-30

Expected behavior This operation should take only a few hundred milliseconds to complete.

Environment (please complete the following information):

  • System and Version : Ubuntu 20.04
  • Target format ELF
  • LIEF commit version: 0.10.1-bfe5414

Additional context I'm writing a Python implementation of checksec.sh based on LIEF, and so far the performance is my main issue.

thanks !

Wenzel avatar Jul 20 '20 20:07 Wenzel