-
Notifications
You must be signed in to change notification settings - Fork 32
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
locate_credentials() is slow #33
Comments
Ideas for refactoring:
|
We also get a decent improvement on > bench::mark(
+ is.list(signature_v4_auth("foo", "bar", verb = "GET", service = "s3", action = "/", request_body = "", canonical_headers = list("x-amz-region" = "foo")))
+ )
# A tibble: 1 x 14
expression min mean median max `itr/sec` mem_alloc n_gc n_itr total_time result memory time gc
<chr> <bch:> <bch:> <bch:> <bch:> <dbl> <bch:byt> <dbl> <int> <bch:tm> <list> <list> <lis> <lis>
1 "is.list(~ 15.1ms 23.9ms 25.5ms 35.6ms 41.8 35.1KB 1 20 478ms <lgl ~ <Rpro~ <bch~ <tib~ to v0.4.5: > bench::mark(
+ is.list(signature_v4_auth("foo", "bar", verb = "GET", service = "s3", action = "/", request_body = "", canonical_headers = list("x-amz-region" = "foo"))),
+ is.list(signature_v4_auth("foo", "bar", verb = "GET", service = "s3", action = "/", request_body = "", canonical_headers = list("x-amz-region" = "foo"), force_credentials = TRUE))
+ )
# A tibble: 2 x 14
expression min mean median max `itr/sec` mem_alloc n_gc n_itr total_time result memory time gc
<chr> <bch:> <bch:> <bch:> <bch:> <dbl> <bch:byt> <dbl> <int> <bch:tm> <list> <list> <lis> <lis>
1 "is.list(~ 2.52ms 2.85ms 2.79ms 3.85ms 350. 1.38MB 9 151 431ms <lgl ~ <Rpro~ <bch~ <tib~
2 "is.list(~ 2.48ms 2.84ms 2.73ms 8.25ms 352. 19.88KB 9 149 423ms <lgl ~ <Rpro~ <bch~ <tib~ |
I had an issue with very slow loads, permeating even calling However, removing |
I opened a ticket within the aws.ec2metadata repo here for the slow |
Hopefully with the 0.2.0 release of |
Hey @jon-mago - that timeout will help. What would be better (for us) is if aws.signature followed the typical credential precedence structure (check .aws/credentials before Instance/Container IAM Roles). Seems pretty consistent:
Thoughts on why CloudyR is different, and maybe offerening the regular pattern as an option? |
I'm not sure why it's different. I suspect the answer is merely "because it was written that way quite a while ago". While it would be a kind of breaking change to "put the order right", I'm not averse to that, as I suspect it will break few things in practice. I will have a think on how to offer the standard order as an option, so it can be a more gradual transition. |
Example from cloudyr/aws.s3#166
Report from Vitalina Komashko:
This runs about 10x slower than the AWS CLI. Issue may be with
locate_credentials()
:The text was updated successfully, but these errors were encountered: