Skip to content

bat slow when doing a git lg and using it as the pager compared to less #1147

Open
@trajano

Description

@trajano

What version of bat are you using?

bat 0.15.4

Describe the bug you encountered:
When using bat as the core pager git config --global core.pager bat and using it with git lg using git config --global alias.lg=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

The performance of git lg on a long history is noticeablely slower compared to that of less. This happens in both CMD and Windows Terminal. Though it is more noticeable in Windows

Describe what you expected to happen?
Performance should be comparable to less, maybe about 10% slower, but you can see it rendering.

How did you install bat?
scoop

[paste the output of info.sh here]
Microsoft Windows [Version 10.0.19041.450]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions