Skip to content

Performance issues #2104

@tarsius

Description

@tarsius

The performance regression in v2.1 was due to a design flaw in the code that reverted file-visiting buffers when then files changed on disk. On every revert cycle, it was recalculated for each buffer whether it visits a file that is located inside a repository and whether the file tracked. That was to expensive when there were many buffers open and/or the repository tracked many files.

I have now replaced that implementation with magit-auto-revert-mode, a globalized variant of the built-in auto-revert-mode, which does not have this issue.

Originally I opened this issue because after the release many issues about alleged performance regressions were opened and most of these issues appeared to be duplicates. Now that I believe to have addressed the regression, I am closing this.

Magit still has performance issues - mainly the "everything is needlessly recreated all the time" issue. But that's not a regression but a very old design decision. I do intend to address that in v3, see the milestones page and click on "more" below "3.1.0".


The feedback about changes in performance characteristics in v2.1 has been mixed. On one hand many users have reported massive performance gains, but there are also reports of performance having gotten worse.

I intend to address these regressions in v2.5.0, but so far it isn't clear in most cases, what is causing these issues. It seems that depending on repository and usage characteristics performance can still be quite bad. Figuring out what exactly causes these issues, will allow me come up with the appropriate countermeasures.

You can help me with that by accompanying your reports about performance regressions with benchmarks. Instead of reporting that "everything is slow", make an effort narrow it down. Which commands are effected? Is the performance worse in certain repositories - what are the characteristics of those repositories? If you know elisp, then please make an effort to narrow the issue down to certain code yourself.

Also have a look at the existing issues and if one matches the symptoms you are experiencing, then comment on those, providing additional information. #2099, #2097, #2049, #1947.


Other issues about performance which were created after I created this one: #2105, #2108, #2162, #2228.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions