web-infra-dev / nodejs_resolver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perf: reuse file size for `fs::read_to_string`

Boshen opened this issue · comments

fs::read_to_string uses another path.metadata() stat call which is not needed.

Wrong idea, stat is never read before reading a file.