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

🐛 improve decompile performance #530

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Conversation

pranavgaikwad
Copy link
Contributor

@pranavgaikwad pranavgaikwad commented Mar 8, 2024

This improves decompilation performance significantly. Also adds more tracing spans so we get more visibility into decomp perf in future.

Before:

  • Full analysis via kantra in source + deps mode
    InProgress

  • Decompile performance (41 sec per file, 22451 sec total)

    Screenshot_20240308_133015

After:

  • Full analysis via kantra in source + deps mode (improved by )

    real	10m21.651s
    user	0m1.978s
    sys	0m2.554s
    
  • Decompile performance (3.1 sec on per file, 1683 sec total, improved by ~93%)

    Screenshot_20240308_133054

There's one more issue we need to fix. We are decompiling for dependency CLI too. That's because we use the same Init() function for analyzer and dep cli. We either need to combine these two commands, or have an alternate InitDep() function interface on providers that does a light weight init of providers. Captured in #529

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
Copy link
Contributor

@jmle jmle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 great catch

provider/internal/java/util.go Outdated Show resolved Hide resolved
Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I think the new spans will be really helpful too!

@shawn-hurley shawn-hurley merged commit 073e142 into konveyor:main Mar 11, 2024
6 checks passed
aufi pushed a commit to aufi/analyzer-lsp that referenced this pull request Mar 25, 2024
This improves decompilation performance significantly. Also adds more
tracing spans so we get more visibility into decomp perf in future.

Before:

* Full analysis via kantra in source + deps mode
    _InProgress_

* Decompile performance (41 sec per file, 22451 sec total)


![Screenshot_20240308_133015](https://github.com/konveyor/analyzer-lsp/assets/9839757/f4e282c0-bce2-4930-a828-204eb3c98a4d)


After:

* Full analysis via kantra in source + deps mode (improved by )
     ```
     real	10m21.651s
     user	0m1.978s
     sys	0m2.554s
     ```
     
* Decompile performance (3.1 sec on per file, 1683 sec total, improved
by ~93%)


![Screenshot_20240308_133054](https://github.com/konveyor/analyzer-lsp/assets/9839757/22d9b883-baef-4aef-8f07-36f4e18d693b)

    
There's one more issue we need to fix. We are decompiling for dependency
CLI too. That's because we use the same _Init()_ function for analyzer
and dep cli. We either need to combine these two commands, or have an
alternate _InitDep()_ function interface on providers that does a light
weight init of providers. Captured in
konveyor#529

---------

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
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.

4 participants