microsoft / microsoft/TypeScript
Cache `getExePath()` for performance reasons
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Would it be possible to have `getExePath()` cache its result so we don't have to do all this lookup every time `tsgo` is invoked? The platform and arch rarely changes once installed on disk.
In one of the repositories I'm maintaining, we've inlined what `tsgo.js` does and added caching on top of it. We're not a very big monorepo, but this shaved off several seconds for us.
Contributor guide
Research direction
Start in tsgo.js by locating getExePath() and tracing how often it runs when tsgo is invoked. Check the existing lookup behavior across platforms and architectures, then confirm that caching preserves the selected executable while avoiding repeated lookups. Done means repeated invocations no longer redo the lookup and the existing behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, performance, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100