Closed Bug 1564114 Opened 5 years ago Closed 5 years ago

hg rebase can be very slow (~1 changeset/minute), at least after Prettier changes

Categories

(Firefox Build System :: Bootstrap Configuration, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: aryx, Unassigned)

References

Details

At the end of last week, the mozilla-central javascript code reformatted with Prettier (bug 1561435).

To be able to rebase changes over those changes, ./mach bootstrap has to be executed.

When I backed out a bigger changeset from before and tried to rebase it onto the current mozilla-central tip, the rebase got slow after rebasing ~140/177 files and then progressed with 1-2 files/minute but eventually succeeded: https://hg.mozilla.org/mozilla-central/rev/7e6657f88b7694ecd841088963ff71d767e4ec22

A new attempt to perform the action got slow after ~30 files, for a sheriff it was slow from the start.

What's the bottleneck here? Memory? Can the command be performant?

This is somewhat expected, and the same thing happened with clang-format if I remember correctly. I'll have a look into whether or not it's possible to make some optimisations here, :dmosedale suggests --cache might help.

FWIW, we'll turn off this rebase extension once most people rebased.

Is it actually necessary to run ./mach bootstrap and turn on the format-source extensions for sheriffs? Presumably, they merge formatted code onto already formatted code, so this shouldn't be needed.

Flags: needinfo?(aryx.bugmail)

In this case code from Thursday got backed out (one day before the big reformat) - the format-source extension would be needed in that case?

Flags: needinfo?(aryx.bugmail)

It's needed for the people who submitted patches to be able to seamlessly rebase locally.

Formatting the pending patches on autoland last Friday which managed to pass through seemed like a good compromise, but I wouldn't expect sheriffs to rebase themselves in future backout situations.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.