Conversation
jakebailey
left a comment
There was a problem hiding this comment.
FWIW it seems like https://www.npmjs.com/package/node-object-hash is 10x faster (if you can believe their benchmarks).
|
I can confirm that this PR fixes the test case I had for #5056. Which is roughly: $ git clone https://github.com/DefinitelyTyped/DefinitelyTyped.git
$ git switch --detach c76c419153bf70858ab82843483657ae1bf11f17
$ pnpm install --filter . --filter '...[HEAD^1]...'
$ pnpm ls --depth Infinity --parseable --filter '...@types/**[HEAD^1]...'(This goofy command is part of a workaround for #7283; unfortunately it can stil OOM but this PR has fixed more typical runs.) |
|
oh, ok I'll use node-object-hash instead. |
|
I'm still seeing this: Is there another step I need to do? |
|
Reading https://github.com/SkeLLLa/node-object-hash/blob/master/src/stringifiers.ts#L392, it looks like this library builds up a hash by building a huge string representation and then hashing it... which was what we were already attempting to avoid... (Related is SkeLLLa/node-object-hash#63 (comment), which is the same root cause; building up huge strings). I guess my suggestion for a "faster" library was not a good one, because it looks like (In the same way, https://www.npmjs.com/package/hash-object cannot be used because it just deep sorts the object and JSONifies it.) |
|
Ok, let's switch to object-hash then |
|
Will send a PR shortly; was already working on it. |
|
Sent #7591. |
## Proposed Changes - pnpm/pnpm#7583 - pnpm/pnpm#7563 - pnpm/pnpm#7591

close #5056