Unverified Commit 83f7b5a8 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Myles Borins
Browse files

src: fix performance regression in node_file.cc

Commits dcb69291, 4396bebf and 8a96d05e turned the O(n) scan in
InternalModuleReadJSON() into an O(4n) scan. Fix the performance
regression by turning that into a linear scan again.

PR-URL: https://github.com/nodejs/node/pull/31343


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarGuy Bedford <guybedford@gmail.com>
Reviewed-By: default avatarDavid Carlier <devnexen@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarJan Krems <jan.krems@gmail.com>
parent aed00d7d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment