JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app

πŸš€ Feature: Improve setup performance

Open
#1,782 1 comment 0 reactions 1 assignee Claimed by @JoshuaKGoldberg View on GitHub
status: accepting prs type: feature
Dominant language
TypeScript
Stars
1.4k
Forks
89
Avg merge
1m
Merged PRs (30d)
3

Description

### Bug Report Checklist

- [X] I have pulled the latest `main` branch of the repository.
- [X] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create/issues?q=is%3Aissue) and found none that matched my issue.

### Overview

The total time to create a repository using create-typescript-app's Common preset right now is about 35 seconds. That's rather slow. I'd like to get it down much shorter.

As part of JoshuaKGoldberg/create#72, I added in rudimentary timing groups for applied scripts and requests. Here's raw data from an example run with create-typescript-app's Common preset:

```plaintext
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ group β”‚ id β”‚ time (ms) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 'scripts' β”‚ 'pnpm install' β”‚ 6239 β”‚
β”‚ 'scripts' β”‚ 'pnpm lint --fix' β”‚ 2305 β”‚
β”‚ 'scripts' β”‚ 'npx -y all-contributors-cli generate' β”‚ 13424 β”‚
β”‚ 'scripts' β”‚ 'npx -y all-contribut ... ojectManagement,tool' β”‚ 12355 β”‚
β”‚ 'scripts' β”‚ 'pnpm format --write' β”‚ 792 β”‚
β”‚ 'requests' β”‚ 'branch-protection' β”‚ 149 β”‚
β”‚ 'requests' β”‚ 'repository-labels' β”‚ 16452 β”‚
β”‚ 'requests' β”‚ 'repository-settings' β”‚ 1335 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

### Additional Info

My initial takeaways are that:

* `npx -y all-contributors-cli` commands are _slow_: I'd like to look into doing their work manually
* This isn't the first time I've been tempted to: https://github.com/all-contributors/cli/issues/362
* `repository-labels`, running `setGitHubRepositoryLabels` from `set-github-repository-labels`, is much slower than it should be too. I'll have to look at its performance again.
* Can its multiple API calls be joined into one?
* Failing that, can it be parallelized more?
* `pnpm install` taking >6 seconds also isn't ideal. Can I speed that up?
* Does `pnpm store add` have any impact? I'm guessing no, that that would only serve to bring an even-higher install time down to the >6 seconds I'm seeing...

πŸ’–

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.