mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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: https://github.com/nodejs/node/pull/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>