Skip to content

🚀 Feature: Improve setup performance #1782

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Bug Report Checklist

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 bingo-js/bingo#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:

┌────────────┬─────────────────────────────────────────────────┬───────────┐
│ 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
  • 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...

💖

Metadata

Metadata

Labels

status: accepting prsPlease, send a pull request to resolve this!type: featureNew enhancement or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions