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

com.mycila.inject.internal.Reflect may block threads #6

Closed
tweckert opened this issue Aug 29, 2014 · 8 comments
Closed

com.mycila.inject.internal.Reflect may block threads #6

tweckert opened this issue Aug 29, 2014 · 8 comments
Assignees
Labels
Milestone

Comments

@tweckert
Copy link

We are using mycila-guice 2.10 GA.

We found out that many threads are blocked due to a call on „java.lang.reflect.Method#declaredAnnotations()“ by „com.mycila.inject.internal.Reflect#apply(AnnotatedElement)“. Please have a look at the attached screenshot.

„java.lang.reflect.Method#declaredAnnotations()“ is synchronized, and thus many threads are blocked for a few seconds.

mycila_stacktrace

@mathieucarbou mathieucarbou self-assigned this Aug 29, 2014
@mathieucarbou mathieucarbou added this to the 2.11 milestone Aug 29, 2014
@mathieucarbou
Copy link
Owner

Do you have a junit test I could use to reproduce and verify the correction ?
Thanks!

@mathieucarbou
Copy link
Owner

Hi,

I've juste read again: you are using a quite out-dated version of mycila guice.

See http://code.mycila.com/guice/

The new version has several module and does not seem to have this performance issue since there is no call to getDeclaredAnnotations().

@mathieucarbou mathieucarbou removed this from the 3.3 milestone Aug 29, 2014
@mathieucarbou mathieucarbou added wontfix and removed bug labels Aug 29, 2014
@mathieucarbou
Copy link
Owner

Correction: it has the bug also., I am fixing it ;-)

@mathieucarbou mathieucarbou added this to the 3.3 milestone Sep 15, 2014
mathieucarbou added a commit that referenced this issue Sep 15, 2014
@mathieucarbou
Copy link
Owner

fixed in 3.4.ga

@tweckert
Copy link
Author

Hello Mr.Carbou,
so should we use version 3.4GA because 3.2GA has the same blocking issues from your point of view?
With kind regards,
Thomas Weckert

Von: Mathieu Carbou [mailto:notifications@github.com]
Gesendet: Montag, 15. September 2014 15:58
An: mycila/guice
Cc: Thomas Weckert
Betreff: Re: [guice] com.mycila.inject.internal.Reflect may block threads (#6)

Closed #6#6.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#event-165475105.

@mathieucarbou
Copy link
Owner

Yes definitely. Actually this is caused also by calls to isAnnotationPresent, which I use. So if you are not using eagerly loaded singletons with guice, annotaton parsing is done at every new binding for JSR250.

@mathieucarbou
Copy link
Owner

You can downlaod an updated 2.10 version with a guava cache here: http://dl.bintray.com/mathieucarbou/public/

@tweckert
Copy link
Author

Thanks a lot.

Von: Mathieu Carbou [mailto:notifications@github.com]
Gesendet: Montag, 15. September 2014 16:28
An: mycila/guice
Cc: Thomas Weckert
Betreff: Re: [guice] com.mycila.inject.internal.Reflect may block threads (#6)

You can downlaod an updated 2.10 version with a guava cache here: http://dl.bintray.com/mathieucarbou/public/


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-55597850.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants