web-infra-dev / web-infra-dev/rslint
`react/jsx-sort-props` increases the binary size by 1.38 MiB
- Dominant language
- Go
- Stars
- 459
- Forks
- 33
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 376
Description
#1983 introduced `react/jsx-sort-props` and increased the stripped binary by 1,429,504 bytes (1.363 MiB, 3.98%).
| Commit | Revision | Bytes | MiB |
|---|---|---:|---:|
| `698ef970d` | Before #1983 | 35,959,938 | 34.294 |
| `7f61fbb80` | After #1983 | 37,389,442 | 35.657 |
| `bf5cb8224` | Before #2004 | 37,406,066 | 35.673 |
| `043e9404a` | After #2004 | 37,422,978 | 35.689 |
> Go 1.26.3, macOS arm64
The increase is primarily caused by `golang.org/x/text/collate`, whose static collation tables account for 1,253,056 bytes.
Together, #1983 and #2004 increased the binary size by 1,446,416 bytes (1.379 MiB).
We need to seriously consider whether this cost is justified for a non-recommended rule from a less commonly used plugin, especially as Rslint’s binary size is already showing signs of uncontrolled growth. I believe we should be willing either to sacrifice some rule precision or to reconsider the architecture by moving computations that depend on Node.js behavior to the Node.js side.
Contributor guide
Research direction
Start by comparing the stripped binary around commits 698ef970d, 7f61fbb80, bf5cb8224, and 043e9404, then inspect the implementation introduced by #1983 and #2004. Measure the contribution of golang.org/x/text/collate and assess the proposed precision or Node.js-architecture trade-offs. Done is a documented decision and an implementation that addresses the binary-size concern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, nodejs, react
- Domain
- performance, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100