I'm working on the blazingjj TUI for jj, and would like some way to determine if jj show will be slow to answer, before I call it. Most of the time it is very fast, but if you commit lots of files, or a large file, it will take seconds and lock up the UI.
A good candidate seems to be
jj log --template 'diff.stat().files().len() ++" "++ diff.stat().files().any(|f| f.bytes_delta()>10000)'
To stress test it I created a repo where the target/ folder of a rust project was added. This took almost a minute to compute. Running jj log --stats took half the time, but still too slow. With or without --ignore-working-copy does not seem to affect whatever takes time.
Is there some other way to get an estimate of the size of a commit? I don't need data on individual files, only enough to tell if the UI should display "commit diff too large to show" instead of running jj show.
I'm working on the blazingjj TUI for jj, and would like some way to determine if
jj showwill be slow to answer, before I call it. Most of the time it is very fast, but if you commit lots of files, or a large file, it will take seconds and lock up the UI.A good candidate seems to be
jj log --template 'diff.stat().files().len() ++" "++ diff.stat().files().any(|f| f.bytes_delta()>10000)'To stress test it I created a repo where the target/ folder of a rust project was added. This took almost a minute to compute. Running jj log --stats took half the time, but still too slow. With or without --ignore-working-copy does not seem to affect whatever takes time.
Is there some other way to get an estimate of the size of a commit? I don't need data on individual files, only enough to tell if the UI should display "commit diff too large to show" instead of running
jj show.