Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Tree Finalizer appears to not be working. #57

Open
modulovalue opened this issue Oct 18, 2023 · 0 comments
Open

The Tree Finalizer appears to not be working. #57

modulovalue opened this issue Oct 18, 2023 · 0 comments

Comments

@modulovalue
Copy link

There seems to be a memory leak somewhere.

  • When parsing 50k files with the analyzer, the memory usage peaks at roughly 1.2 GB.

  • With tree-sitter-dart, at around file 35k, the memory usage reaches 15 GB.

  • If we remove the finalizer logic in Tree and free the memory manually:

// ...
final tree = parser.parse(program);
treeSitterApi.ts_tree_delete(tree.tree);
// ...

then tree-sitter-dart peaks at roughly 1.3 GB for all 50k files.

  • If we remove the finalizer, and we don't free memory ourselves, then at around file 35k, we reach 15 GB, so it seems like the finalizer is either not working, or something prevents it from finalizing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant