-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure size_hint never exceeds graph_limit
If we have thousands of syntax nodes on both sides, we can end up attempting to preallocate a very large hashmap. In #542, a user hit an issue with two JSON files where the LHS had 33,000 syntax nodes and the RHS had 34,000 nodes, so we'd attempt to preallocate a hashmap of capacity 1,122,000,000. This required allocating 70,866,960,400 bytes (roughly 66 GiB). Impose a sensible limit on the hashmap. Fixes #542
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters