-
Notifications
You must be signed in to change notification settings - Fork 22
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
It crashes with medium/large/big repo #83
Comments
@mlange-42 |
Hi @perettigiuliano! Thank you for reporting! Unfortunately, I did not find the time to look into this yet. As I have no idea so far what exactly causes the crash, it is hard to judge. But surely this can be fixed somehow. |
@perettigiuliano As a temporary workaround, use the It looks like this is not really a bug. The number of commits is just too big to fit their internal representation into the memory. Not sure how to continue here. Maybe a default limit to the number of commits would be an option. |
@mlange-42
Maybe there something that could serve as suggestion... |
First, the screenshot in the OP shows Rust trying to allocate 10GB of RAM, which is unlikely to be normal. The other thing to notice is the total memory usage. The peak was 33G while parsing the repo, then dropped to "only" 22G while rendering the graph. Overall though, that memory usage feels quite excessive. |
@Nahor Many thanks for investigating and sharing your insights! First, it is definitely good to see that the problem seems not related to parsing or layouting the graph. Regarding the differnences between unicode and SVG output, I can hardly imagine that the final string memory required is (that much) bigger for unicode, even including color escape codes. SVG should definitely be longer. So I guess this is a kind of bug. If not, rendering only the required range could be an option for paged output, or writing directly to a stream for unpaged output. |
Disclaimer: All tests today were run on a
Unicode is significantly bigger than SVG for that repo: 530M for Unicode (no-wrap output) vs 33M for SVG. I assume the reason for being bigger because the lines must be drawn character-by-characters + commit text&alignment, vs just paths elements without commit text (bug?) in SVG. One reason for the slow down is the number of branches and auto-wrapping. That number is so big that auto-wrapping uses a width of 1, which results is 21G worth of Unicode output (vs 530M without wrapping). I think there is no point of using 1 as the minimum width (at the very least not for
Coloring is also significant, if not more:
|
One last detail then I'll stop:
Since those are dealing only with strings and chars, a partial solution might be to avoid using |
Hi, I have just tried with this repo: Switft from apple
git-graph crashes:
Could you fix that?
Thanks
The text was updated successfully, but these errors were encountered: