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

Add type annotations to avoid reflection #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaptastic
Copy link

I did some profiling of our app with Yourkit and found that we were spending a great deal of time doing reflection on some of the S3 api methods. It seems that the type tag on s3-client wasn't having any effect. I added type annotations at each call to s3-client in order to avoid this.

Now warn-on-reflection doesn't report anything from aws.sdk.s3 and we don't see reflection calls as a hot spot in our app anymore.

@weavejester
Copy link
Owner

Rather than adding tags everywhere, I think it might be better to understand why tagging the s3-client var doesn't work in the first place.

@weavejester
Copy link
Owner

Also, which Clojure version are you using?

@chaptastic
Copy link
Author

I agree that's probably a better solution. I will poke around some more and try to get to the bottom of it. The tag is definitely in the metadata on s3-client but doesn't seem to be having an effect.

I'm using 1.5.1.

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.

2 participants