Slow code on critical path of CLI startup #1966
Labels
bug
Something isn't working
P2
Issues not at the top of the work list
package: patrol_cli
Related to the patrol_cli package
This code:
patrol/packages/patrol_cli/lib/src/analytics/analytics.dart
Lines 37 to 46 in 06a5041
is executed on the critical path of Patrol CLI startup. The problem is that it calls
flutter --version
:patrol/packages/patrol_cli/lib/src/analytics/analytics.dart
Lines 186 to 191 in 06a5041
and it's really slow (~2-3 seconds on my M1 MBA).
We should find a way to not block on it, because it's only needed for analytics. This is especially annoying when trying to use tab completion in shell – it makes completion way to slow, practically unusable.
The text was updated successfully, but these errors were encountered: