Repository navigation
Commit cadf10a
lib: use indexed append in ZIP central directory parser
readCentralDirectory() appends one CentralFileHeader per archive entry
with ArrayPrototypePush, which is listed among primordials with known
performance issues. Assign by the existing loop index instead. The
loop runs once per entry, so its trip count grows with archive size.
The change is limited to this loop. Validation and error behavior are
unchanged.
Assisted-by: Claude Code
Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: #67456
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>1 parent 598aa29 commit cadf10a
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
604 | 603 | | |
605 | 604 | | |
606 | 605 | | |
607 | | - | |
| 606 | + | |
608 | 607 | | |
609 | 608 | | |
610 | 609 | | |
| |||
0 commit comments