63 points | 5d ago | Discuss on Hacker News | Back to Radar
The benchmark script is in the repo so you can run it yourself, the results are from my potato computer, will probably be even faster on modern PCs.
I've updated the README to be more clear about that, thanks for pointing that out!
The initial version was in Python which was pretty fast as well, decided to try Rust both for speed and to reuse more constructs from ruff/ty for better compatibility with them.
from django.conf import settings
...
if settings.DEBUG:
...
Currently unref thinks that DEBUG is not used.Similarly, the `application` variable in asgi.py (or wsgi.py) is passed as an argument to the ASGI/WSGI server executable, but that is also marked as unused.
I'll make a PR to add some basic Django support which should address both of your points.
Feel free to open a GitHub issue with a few of the false positives: https://github.com/Apakottur/unref/issues
Results are still poor, specially on the tests side. So far the main learning has been that a tidy codebase (dep graph) is essential for it to work properly.
I'm surprised I didn't find more open source tooling tackling this effectively.
Feel free to open an issue on github if you find any false positives/negatives.
Would be nice to see the definition used placed in the docs/github readme.
I've updated the README and added a FAQ section in the docs to explain this, thanks for the question!
Here's the PR - https://github.com/Apakottur/unref/pull/121
Comments are loaded live from Hacker News and are not stored by Mid or Real.