perf(autolinking): get platform's specific properties #2379
+51
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This Pull Request implements fetching only platform's specific properties. It means when passing
--platform
option toconfig
command, config logic will only get platform's properties, because it doesn't make sense to get informations about Android platform when runningnative_modules.rb
, and same deal withnative_modules.gradle
.I did some benchmarks in project with 50 linked dependencies, and results are:
config
config --platform ios
config --platform android
So it means that linking dependencies during
pod install
got ~7 seconds faster in this specific scenario. If there are more dependencies to be linked, the results are higher.Test Plan:
Same output as before, if there are tools that depends on
config
's command response they won't be affected by this change.3. Run this command:
Returns only
ios
as inplatforms
field, and also for each entry independencies
onlyios
platform should be presented. And this should be valid for any other platform that is available with linked dependency.4. Installing Cocoapods inside
ios/
folder should work in the same way as before.5. Android app should build correctly and link all native dependencies.
Checklist