You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
- `SamCliLocationProvider.getLocation()` is called many times and always
searches for sam on the system, which is slow (especially on Windows).
- Hard to follow the logic of SamCliValidator, too much indirection
involving `isSamCliVersionCached()` and `getSamCliExecutableId()`.
Solution:
- Cache the last-found sam location in `DefaultSamCliLocationProvider`
instead of whatever `DefaultSamCliValidator` was trying to do.
- Use the cached location unless it fails `tryRun()`. This means Toolkit
still "shells out" to `sam`, which can be slow, but at least it avoids
a system search.
0 commit comments