-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Unstable removeComments
and removeEmptyLines
#208
Comments
Hi, @rockmandash ! I've analyzed the problem and identified that the main thread is hanging during the processing. I plan to implement non-blocking operations similar to what we're already using in the security check functionality. I'll work on the fix and update you soon. |
@rockmandash |
Unfortunately it didn't help, my terminal completely freeze!! Stucking at My repo is arround 15 million token |
I just repomix your repomix and ask o1 pro, here is the response: Handling Performance Issues in RepomixIt’s very likely that the combination of Main Points and Potential Fixes1. Why It “Hangs” or Takes So LongHuge Input SizeWith a 15 million–token codebase, you probably have hundreds of thousands (or even millions) of lines of code. Doing comment/empty-line stripping across all files is a lot of text processing in JavaScript. Python Docstring RemovalIf your repository includes Python code, the docstring removal logic in High ConcurrencyRepomix internally uses Event Loop StarvationBecause all these operations are basically CPU-bound JavaScript loops, the main thread can get starved. That’s why even 2. Potential SolutionsA) Turn Off
|
I suggest completely remove these two options since it's causing terminal to freeze, and use the following options:
|
Thanks for the detailed report, @rockmandash! While the process seems to be getting stuck at Current handling for large Python files can indeed be a bottleneck. The existing implementation may cause some performance issues, and can sometimes cause the terminal to freeze. Regarding the use of a temporary directory for repos, I'm a bit skeptical if it would solve the issue, but processing large files by copying them to a temp directory and then processing them using streams might be a good approach. However, that's a big change, so for a faster fix, using worker threads to process files outside the main thread will likely be a more effective solution. We are also exploring using tree-sitter in the future, which might improve processing performance even further. |
My codebase has 15,382,523 tokens , when I set the
removeComments
andremoveEmptyLines
true
, the terminal stucks forever, even ctrl-c not working.The text was updated successfully, but these errors were encountered: