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

Issue/Pull dependencies is inefficient #14560

Closed
6543 opened this issue Feb 3, 2021 · 17 comments
Closed

Issue/Pull dependencies is inefficient #14560

6543 opened this issue Feb 3, 2021 · 17 comments
Labels

Comments

@6543
Copy link
Member

6543 commented Feb 3, 2021

look like gitea >= 1.13.0; gitea < 1.14.0 is affected

-> if you type text into search field no issues/pulls are displayed to select
-> JS does not hit the API to get issues :/

@6543 6543 added the type/bug label Feb 3, 2021
@6543 6543 added this to the 1.14.0 milestone Feb 3, 2021
@lunny
Copy link
Member

lunny commented Feb 4, 2021

If it affected v1.13.0, I think we should move milestone to v1.13.3

@6543 6543 modified the milestones: 1.14.0, 1.13.3 Feb 4, 2021
@gregzawadzki
Copy link

From gitea chat what I came to:

Gitea Version: 1.12.6  This one shows me only #20 and up.
[20:35]
@6543 search by name does not work either. Like it was limited to some number of entries to check. No idea. For example load last 10 to memory, then filter from these 10 matching elements.
[20:37]
@6543 Pattern seems to be, it only shows searches from these, that are visible on 1st page of issues.
On repo1 where I have on 1st page issues #18 and up (#19 is closed) and it shows #18 and up. without #19
On repo2 where on first page i have #20 and up visible, only these are searchable
So it seems to be bound only to 1st page of issues somehow

@6543 6543 self-assigned this Feb 19, 2021
@6543
Copy link
Member Author

6543 commented Feb 27, 2021

Tested (Linux + Firefox 86.0 (64-bit)):

mysql + 1.14.0+dev-765-g42118c6bc works ...
sqlite + 1.14.0+dev-765-g42118c6bc works ...
mysql + 1.13.2+14-g90bf1e796 broken

Discover:
JS does not hit the API to get issues :/

@6543 6543 removed their assignment Feb 27, 2021
@zeripath
Copy link
Contributor

zeripath commented Mar 3, 2021

OK I just tested on 1.13.0+30-g205be63bc

On the issues page this works. On pulls page this works.

(Chromium linux & firefox linux)

@zeripath
Copy link
Contributor

zeripath commented Mar 3, 2021

There is a minimum number of letters required to make it do a search - perhaps this was the issue?

@zeripath zeripath removed this from the 1.13.3 milestone Mar 3, 2021
@zeripath zeripath added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Mar 3, 2021
@zeripath
Copy link
Contributor

zeripath commented Mar 3, 2021

As I cannot reproduce I'm gonna unmilestone and mark it as needs-feedback.

@gregzawadzki
Copy link

@zeripath https://try.gitea.io/seigieu/test/issues/23
On this one, I currently cannot even search for issues
https://youtu.be/c_msyXXHD2I

@gregzawadzki
Copy link

https://youtu.be/iJhSqSpA0X4
Here is movie of my instance. 1.12.6 currently. Cant select any from second page

@6543
Copy link
Member Author

6543 commented Mar 4, 2021

@seigieu witch browser & OS do you use?

@zeripath
Copy link
Contributor

zeripath commented Mar 5, 2021

Could you add [email protected] to that repository as a writing collaborator so I can test.

That the number of issues is >20 makes me suspicious it's a paging issue but I'm not certain.

@zeripath
Copy link
Contributor

zeripath commented Mar 5, 2021

Ok your second video looks exactly like a paging issue, does typing the issue in to the search box reveal the issues?

In your first video try.gitea.io looks like it's running very slow indeed and I suspect that the API call to list the issues hasn't returned by the time you're expecting it to have and our UI doesn't have any marker to show that it's doing a search.

@gregzawadzki
Copy link

@6543
Linux Firefox (newest) also Chromium. Same effect.
@zeripath i get "User does not exist" on try.gitea.com.
If you mean my repository I cannot route it to world. It's only available in LAN.

(after some testing...)

But when I tested it more to look for issue. Search seems to work. But it searches ONLY for whole words.
If i type propa it will not look for popragation etc. Have to type propagation literally for it to search just fine.
Typing #33 have found 33 string in 2020-10-21 13:02:33 text line, but not issue #33.

I'm not sure if I didn't get confused, since I was 100% sure I can search issues by #33 and partial words etc.

And for pagination part. Pagination issue seems to be present only when I click and scroll down (not sure if its feature or issue now. May be feature to limit to latest entries).

try.gitea.com - yes, its running very slow. checked in network tab and its a long loading issue.

@zeripath
Copy link
Contributor

zeripath commented Mar 5, 2021

I meant on the try.gitea.io repository you'd uploaded.

In regards to exact searching #14694 should help there.

I'll look at the rest of your comments tomorrow. Sorry I didn't get to this today.

@zeripath zeripath added this to the 1.14.0 milestone Mar 8, 2021
@zeripath zeripath removed the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Mar 8, 2021
@zeripath
Copy link
Contributor

I think in part some of this issue is related to #12827

@6543 6543 modified the milestones: 1.14.0, 1.14.1 Mar 18, 2021
zeripath added a commit that referenced this issue Mar 29, 2021
/api/v1/repos/issues/search is a highly inefficient search which is unfortunately
the basis for our dependency searching algorithm. In particular it currently loads
all of the repositories and their owners and their primary coding language all of
which is immediately thrown away.

This PR makes one simple change - just get the IDs.

Related #14560
Related #12827

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 29, 2021
…a#15179)

Backport go-gitea#15179

/api/v1/repos/issues/search is a highly inefficient search which is unfortunately
the basis for our dependency searching algorithm. In particular it currently loads
all of the repositories and their owners and their primary coding language all of
which is immediately thrown away.

This PR makes one simple change - just get the IDs.

Related go-gitea#14560
Related go-gitea#12827

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Contributor

zeripath commented Mar 29, 2021

Looking at try.gitea.io it appears that the improvement from #15179 could actually be sufficient to close this issue! Although I would still argue that the API is still too non-performant.

@6543
Copy link
Member Author

6543 commented Mar 29, 2021

let it open rename it & let it open

@6543 6543 modified the milestones: 1.14.1, 1.15.0 Mar 29, 2021
@6543 6543 changed the title Issue/Pull dependencies do not work Issue/Pull dependencies is inefficient Mar 29, 2021
@6543
Copy link
Member Author

6543 commented Mar 29, 2021

close in favour of #12827

@6543 6543 closed this as completed Mar 29, 2021
@6543 6543 modified the milestones: 1.15.0, 1.14.1 Mar 29, 2021
6543 pushed a commit that referenced this issue Mar 31, 2021
…#15192)

Backport #15179

/api/v1/repos/issues/search is a highly inefficient search which is unfortunately
the basis for our dependency searching algorithm. In particular it currently loads
all of the repositories and their owners and their primary coding language all of
which is immediately thrown away.

This PR makes one simple change - just get the IDs.

Related #14560
Related #12827

Signed-off-by: Andrew Thornton <[email protected]>
@lunny lunny removed this from the 1.14.1 milestone Apr 11, 2021
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants