Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow the agent to be configured with package name / classloader restricts #243

Closed
mikehearn opened this issue Jan 17, 2017 · 3 comments
Closed
Assignees

Comments

@mikehearn
Copy link
Contributor

Our app uses fibers in a small part of its codebase, including classes loaded via a custom classloader. But the rest of the app (>10,000 classes by the time it's started up, d'oh) doesn't need them.

Unfortunately Quasar scans all loaded classes, and this significantly increases startup time. Without the agent, the server starts in about 2.5 seconds. With the agent, it's more like 4.5-5.0 seconds. So, nearly double the time.

It'd be nice if we could inform the agent about where to look so it can skip the majority of the loaded classes. For instance, by specifying ProtectionDomains (i.e. jars) to scan, or alternatively, package name wildcards to not scan.

@pron pron self-assigned this Jan 17, 2017
@pron
Copy link
Contributor

pron commented Mar 21, 2017

In SNAPSHOT. To exclude packages, add exclusion patters separated by ; as agent parameters like so: `-javaagent:=x(pattern1;pattern2;...)

@pron pron closed this as completed in 63861ac Mar 23, 2017
@mikehearn
Copy link
Contributor Author

mikehearn commented May 10, 2017

Sorry for taking so long to get around to really exercising this feature.

Here are some startup timings. Without exclude pattern:

[18.829425, 13.800646, 13.932261, 14.451902, 18.473767, 13.772951, 18.821028, 13.446343, 18.580407, 14.966181]

After we wrote a tool to calculate some exclude patterns and apply them:

[8.154252, 9.509119, 6.668626, 6.723968, 6.70011, 6.691607, 7.034623, 6.689348, 7.492139, 7.320871]

Pretty nice improvement! The exclude patterns are kind of ugly/hacky - perhaps a way to tag classloaders with include/exclude flags would be nicer, but it works.

Can you do a release with this included? We'd rather not depend on a snapshot.

@exFalso

@pron
Copy link
Contributor

pron commented May 11, 2017

I'll do a sweep of open bugs that can be fixed quickly and cut a release next week.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants