Skip to content

How to get size of changes in log #9036

Description

@peso

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions