WordPress / WordPress/contributor-toolkit

Install/build logs run at maximum verbosity into renderer state that is never rendered

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: build-install next-validation performance post-v1.0
Dominant language
JavaScript
Stars
36
Forks
13
Avg merge
23h 19m
Merged PRs (30d)
72

Description

What happens

Install and build output is produced at maximum verbosity and then accumulated in renderer memory that is never shown, taxing the UI during the heaviest phases of setup.

Root cause

Several compounding pieces:

  • npm log level defaults to verbose in both runners (src/install-runner.js:34, src/script-runner.js:80) — tens of MB of text, every byte crossing IPC. Audit and funding checks also add a full extra registry round trip after install.
  • The renderer accumulates the entire install/build log into a state string on every chunk (src/renderer/index.jsx:825) — but that state is attached to no element; only the runtime log ref is rendered. Growing a string by concatenation per chunk re-renders the whole site row each time, purely to be discarded.
  • Other log buffers (runtime logs, setup logs, terminal messages) are likewise unbounded, while the terminal itself already caps scrollback.
  • Clone progress sends one IPC message per progress event (src/main.js:479-483), each re-rendering the app, while the main process is simultaneously CPU-bound on the clone itself.

Idea

Default npm to notice-level logging with audit/funding off, delete the never-rendered log state, cap the remaining buffers to a trailing window, and coalesce clone progress to a few updates per second. Mostly deletions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/install-runner.js:34, src/script-runner.js:80, src/renderer/index.jsx:825, and src/main.js:479-483 to trace verbosity, log accumulation, and clone progress updates. Check how runtime, setup, and terminal buffers are rendered and capped. Done means unnecessary logs and IPC updates no longer burden the UI while the remaining buffers retain only a trailing window.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop, performance, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.