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

Markdown references should be fetched asynchronously or be limited in count #16257

Closed
2 of 6 tasks
noerw opened this issue Jun 26, 2021 · 3 comments · Fixed by #15955
Closed
2 of 6 tasks

Markdown references should be fetched asynchronously or be limited in count #16257

noerw opened this issue Jun 26, 2021 · 3 comments · Fixed by #15955
Labels
performance/speed performance issues with slow downs type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@noerw
Copy link
Member

noerw commented Jun 26, 2021

  • Gitea version (or commit ref): 1.15.0+dev-499-gca18c4d44
  • Git version:
  • Operating system: linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

When a markdown file or a comment contains lots of references (looking at you, CHANGELOG.md), they are all resolved, inducing very high server load: loading the view page of gitea's CHANGELOG.md takes ~15secs!

I'm not sure if it's sensible to just limit the number of references that are preloaded, as that change has quite a impact on functionality.
Loading those issue cards on demand (on hover?) might be a better approach, though inducing latency.
Maybe a hybrid approach is best: load max 5 references on page render, and resolve the rest on hover via ajax

@noerw noerw added type/proposal The new feature has not been accepted yet but needs to be discussed first. performance/speed performance issues with slow downs labels Jun 26, 2021
@zeripath
Copy link
Contributor

This should be substantially better since #16251.

@noerw
Copy link
Member Author

noerw commented Jun 26, 2021

@zeripath Yeah the example above ran with that commit, while certainly better, it's still very high load :/

@zeripath
Copy link
Contributor

Your sha ref isn't a published version of Gitea btw.

1.15.0+dev-488-g622f1e764 is current main


Yeah I'm not surprised that there's still high load - I suspect you're right that issue cards are potentially the next hot spot.

The specific way in which #16251 came to light wouldn't have hit those.

Tbh our main render needs to do less overall.

(Although if we can get a safe(r) cache #16226 we could cache more things I think)

@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants