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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[match][sigh] speed up profiles fetching by adding name filter to the API calls #21016
[match][sigh] speed up profiles fetching by adding name filter to the API calls #21016
Conversation
d8443b5
to
c7f5288
Compare
c7f5288
to
ca330cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. Can鈥檛 wait to upgrade match 馃憦
@joshdholtz @rogerluan can you please merge this PR. We are using this improvement for 6 months already and are really happy with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃挴 Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulTaykalo , sorry that this PR didn't get merged yet 馃槵 it ended up developing merge conflicts, would you mind fixing them by merging master into this branch?
Also, since we've merged a PR that potentially improved match performance by up to 100x, would you mind running your tests again to check whether this PR still improves performance, and by how much? 馃檱
Thank you so much!
@rogerluan from what I see all these changes were added in #21694 this PR |
Thanks for verifying this, @PaulTaykalo 馃 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Speeding up some queries on AppStoreConnectAPI
Description
When running
match
andsigh
commands, and there's a need for searching specific provisioning profiles, the current general pattern is to search for all profiles by callingSpaceship::ConnectAPI::Profile.all
and filter later i.e.In this PR we're adding additional filtering when querying
ConnectAPI
which greatly reduces request times.These queries are running multiple times during
sigh
/match
tools so decreasing time even for a few seconds will get a great improvement in speedImportant notes
uuid
, it's not actually true. When the profile is renamed, itsuuid
changes as well.Some numbers
Numbers greatly depend on the portal size, these are numbers for a real one (~200 profiles, 50 certs)
Querying all profiles (without specifying name) was taking from 60 to 150 seconds.
Adding name filtering decreased fetching time by almost 25x times 馃槷
Testing Steps
Basically,
sigh
andmatch
should work exactly the same.