clj-aws-s3
clj-aws-s3 copied to clipboard
Add type annotations to avoid reflection
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.
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.
Also, which Clojure version are you using?
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.