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

Optimize the IndyBootstrap#getClassNamesFromBundledPlugin method to reduce memory usage caused by package scanning #3730

Open
fidoooooowang opened this issue Jul 23, 2024 · 1 comment
Labels
agent-java community Issues and PRs created by the community

Comments

@fidoooooowang
Copy link

fidoooooowang commented Jul 23, 2024

Is your feature request related to a problem?

image

image

Describe the solution you'd like

When the program starts executing the IndyBootstrap#bootstrap method, there will be logic to obtain the class name list of the specified plug-in. However, in this logic, I think some optimizations can be made. As shown in the figure, in the original method, multiple threads may concurrently request the data of the same pluginPackage. At this time, multiple jar packages will be scanned, and there will also be a PackageScanner global lock in it; suppose we advance this lock and based on pluginPackage distinguishes different locks, which can improve application startup performance and reduce memory usage caused by package scanning. I tested it locally and it works.

Describe alternatives you've considered

image image
@github-actions github-actions bot added agent-java community Issues and PRs created by the community triage labels Jul 23, 2024
@jackshirazi
Copy link
Contributor

Thanks for the input here. We won't have time to advance this proposal in the near future, but will definitely keep the issue open for when time comes available!

@jackshirazi jackshirazi removed the triage label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java community Issues and PRs created by the community
Projects
None yet
Development

No branches or pull requests

2 participants