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

Bad Performance on lagre PRs #26201

Closed
thigg opened this issue Jul 28, 2023 · 1 comment · Fixed by #26233
Closed

Bad Performance on lagre PRs #26201

thigg opened this issue Jul 28, 2023 · 1 comment · Fixed by #26233
Labels
performance/speed performance issues with slow downs type/bug

Comments

@thigg
Copy link
Contributor

thigg commented Jul 28, 2023

Description

I tried this with the current deployment on try: https://try.gitea.io/thigg/podqast/pulls/1/files
with 85k additions and 12k deletions and even though the site is loading in a matter of 10s of seconds I can not really type comments in there as there is a several seconds lag between typing and seeing the letter on the screen.

I agree that you should not have PRs this big... but if you get into the situation for some reason, it would be nice if at least gitea would not get in your way too.

Also note that this is an extreme example. I can watch our gitea while typing on a 6k LOC review.

To reproduce:Create a large PR, scroll down: click show More twice and try to add a comment. Letters are having now a significant delay between your keypress and appearance on screen.

Gitea Version

1.21.0+dev-410-g7866a6e0e and 1.20.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

It looks like the browser is extremly Slow. I ran the firefox profiler and it says it spends its time in Reflow with get Element.scrollHeight:
grafik

Unfortunatley I lack the knowledge to provide further assistance here.

Git Version

No response

Operating System

No response

How are you running Gitea?

apt repository in qemu

Database

None

@thigg thigg added the type/bug label Jul 28, 2023
@lunny lunny added the performance/speed performance issues with slow downs label Jul 28, 2023
silverwind added a commit that referenced this issue Jul 30, 2023
Resizing the comment editor can be a very expensive operation because it
triggers page reflows, which on large PRs can take upwards of seconds to
complete. Disable this mechanism on the diff page only where we know
that the page can get large.

Fixes #26201 for the textarea
editor.

I don't think this can be fixed for EasyMDE because as far as I can
tell, it exposes no option to disable this resizing.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Jul 31, 2023
Resizing the comment editor can be a very expensive operation because it
triggers page reflows, which on large PRs can take upwards of seconds to
complete. Disable this mechanism on the diff page only where we know
that the page can get large.

Fixes go-gitea#26201 for the textarea
editor.

I don't think this can be fixed for EasyMDE because as far as I can
tell, it exposes no option to disable this resizing.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
@thigg
Copy link
Contributor Author

thigg commented Jul 31, 2023

Awesome. Your responsetime is impressive :)

silverwind added a commit that referenced this issue Jul 31, 2023
Backport #26233 by @silverwind

Resizing the comment editor can be a very expensive operation because it
triggers page reflows, which on large PRs can take upwards of seconds to
complete. Disable this mechanism on the diff page only where we know
that the page can get large.

Fixes #26201 for the textarea
editor.

I don't think this can be fixed for EasyMDE because as far as I can
tell, it exposes no option to disable this resizing.

Co-authored-by: silverwind <me@silverwind.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
performance/speed performance issues with slow downs type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants