Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MachO: Memoize Symbols by address and name during parsing #579

Merged

Conversation

xhochy
Copy link
Contributor

@xhochy xhochy commented May 18, 2021

I was having really long runtimes like also reported in #442 . Actually, my issue is exactly what is covered in conda/conda-build#3684 . Profiling lead to most of the runtime being spent in Binary::get_symbol and BinaryParser::do_bind (these were actually the only functions visible by eye in the profiling plot). For me the runtime of lief.parse(…) goes down as follows for the example of the haskell compiler:

file size time in s (before) time in s (this PR)
 libHSbase-4.14.1.0-ghc8.10.4.dylib 12M 47  0.2
 libHSghc-8.10.4-ghc8.10.4.dylib  97M 3161 1.4

@romainthomas
Copy link
Member

Thank you @xhochy for this contribution!

@romainthomas romainthomas merged commit 7eed525 into lief-project:master May 19, 2021
@xhochy xhochy deleted the memoize_symbols_during_parse branch May 19, 2021 12:47
malfet added a commit to pytorch/builder that referenced this pull request May 26, 2021
Containing perf fix for large dylib parsing (lief-project/LIEF#579)

Should be enough to fix pytorch/pytorch#58534
malfet added a commit to malfet/lief-feedstock that referenced this pull request May 27, 2021
malfet added a commit to pytorch/builder that referenced this pull request May 27, 2021
Containing perf fix for large dylib parsing (lief-project/LIEF#579)

Should be enough to fix pytorch/pytorch#58534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants