Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert 133858 due to perf regression #135263

Closed
wants to merge 1 commit into from
Closed

Conversation

lqd
Copy link
Member

@lqd lqd commented Jan 8, 2025

This PR prepares a revert of #133858 due to the unexpected perf regressions.

cc PR author @dianne and reviewer @lcnr

Opening as draft to leave some time for @dianne to take a look in case the fix is obvious. If not, or if they don't have time to look into it soon, we can land this revert. Once the issue is fixed in the original PR we can reland it with ease.

@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2025
@lqd
Copy link
Member Author

lqd commented Jan 8, 2025

Ok, this is going to miss the nightly cutoff but it's fine.

@lqd lqd marked this pull request as ready for review January 8, 2025 20:27
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@lqd
Copy link
Member Author

lqd commented Jan 8, 2025

fml

…nts-for-static, r=lcnr"

This reverts commit 6afee11, reversing
changes made to 9c87288.
@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 8, 2025

As long as this doesnt miss the beta cut off in like a month its technically fine right? It's "only" a 20% regression to some crates on nightly

@lqd
Copy link
Member Author

lqd commented Jan 8, 2025

The revert doesn't apply cleanly since #134523 landed in the meantime.

I've rebased to fix the conflicts, hopefully correctly to change the new code from #134523 to match the pre-revert state -- and #133858 landing also created conflicts for #134523. It's conflict city over here. That will make #134523's beta backport harder...


As long as this doesnt miss the beta cut off in like a month its technically fine right?

Maybe not fine per se, but in a sense yes, and in another sense less so: if another perf run had been done pre-merge, the PR likely wouldn't have landed yet. A revert was requested and we usually are revert-happy: it's usually easier to investigate issues without any additional time pressure on the author.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 8, 2025

Ah right... merge conflicts

@lqd
Copy link
Member Author

lqd commented Jan 8, 2025

This code should generally be slow-moving, but yes it'd be nice if not too much code started relying on #133858.

@@ -1207,7 +1206,15 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
borrowed,
|diag| {
session_diagnostics::TailExprDropOrder { borrowed }.decorate_lint(diag);
explain.add_explanation_to_diagnostic(&this, diag, "", None, None);
explain.add_explanation_to_diagnostic(
this.infcx.tcx,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya this is right.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 9, 2025

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Jan 9, 2025

📌 Commit 977e6c8 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2025
@klensy
Copy link
Contributor

klensy commented Jan 9, 2025

Perf issue looks resolved #135273 (comment), still want to revert?

@compiler-errors
Copy link
Member

@bors r-

Let's not cause churn if a more targeted fix is still being evaluated

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 9, 2025
@lqd
Copy link
Member Author

lqd commented Jan 9, 2025

https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-01-09/near/492749840

After discussing in today's t-compiler meeting, we chose to land the perf fix with the small diagnostics regression rather than this revert.

@lqd lqd closed this Jan 9, 2025
@lqd lqd deleted the revert-133858 branch January 9, 2025 15:31
@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 9, 2025

In the future if you're unsure whether you would actually like to revert or merge a fix can you keep the PR marked as draft, I was also under the impression there was a level of "urgency" here as you seemed to even want this to make it into the nightly cut off.

From my POV it seemed clear that you wanted this merged and you wanted it merged quickly to avoid merge conflicts. On the other hand reading the meeting thread I am not sure if that is actually accurate as you seemed to want opinions from others on T-compiler and it also did not seem to take very much discussion to be convinced that merging the fix was the better move

It's not a big deal I'm just slightly confused as to what happend here as it seems like there was some kind of miscommunication 😅

@lqd
Copy link
Member Author

lqd commented Jan 9, 2025

Ah I wasn’t unsure. I wanted this merged quickly indeed, and also disagree with the choice that was made 😓.

I marked this ready yesterday when the alternative solution didn’t exist then, nor did we know whether there’d be one. I asked in the meeting because lcnr had no opinion on the alternative PR, which is fine of course.

I didn’t want to discuss it more in the meeting, because there were now two solutions in flight, decreasing the urgency, and I had already spent a lot of time on this issue that only seemed important to me and moved on.

In any case, I’ll keep your comment in mind in the future. Sorry, if this caused you any inconvenience.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 9, 2025

Ah okay that makes sense, no worries then. It sounds like I did understand things correctly and it was just unfortunate timing on me getting around to reviewing this and the compiler meeting happening.

@dianne
Copy link
Contributor

dianne commented Jan 9, 2025

In the future I'll also make sure to say something in the revert PR if I open an alternative. Sorry for the trouble, and thanks for handling all this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants