-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Folder jumping #2818
Folder jumping #2818
Conversation
Maybe a better choice could be to edit the TreeEntry struct and a JumpedFolder attribute relink the treeentry to the pointing file. In this case the treeEntry would reflect the real pointed file and not the folder. It could also limite the calculation to one time. But doing so maybe break other things ... |
I tested this in my local install, latest master + this merge. It worked fine, but the performance impact was huge, loading times went up A LOT. Gogs version: 0.9.8.0312 (+ merge) |
I rebase code since it was base on old version and i did some measures. (done with sqlite for db and gogs as repo with some folders to jump, Go version: 1.6) Before Rebase : After rebase : |
Very nice 👍 |
I find the performance impact of the current solution very high. On a small Java project (3 MB code) the response times went from 270ms to 4200ms. Java projects often have a lot of empty folders because of the package names and this sums up to a lot of loops in the code. Edit: "Empty" as in "single-entry". |
@mhartkorn you are right on this, gogs would benefit from aggresive caching at a few places. On our KVM hosted gogs even loading the mainpage takes ~1 second for rendering. |
@xor-gate In theory gogs supports redis and memcached but they don't seem to be used at all. But even if gogs was able to use redis for folder structures, a 4 second page load for every single folder in a repository for people that don't use redis is too long to be considered useful in my opinion. Maybe this feature can be an option. |
People could benefit if in-memory cache works for this long operations. IMHO 4 seconds is crazy for a repo of 3 megabyte. Seems a little performance regression here probably. Even when the disk cache is not warmed up it should not take 4 seconds. |
Just a note Gogs has unified cache interface, it does not matter you use in-memory, redis or memcache. |
* fix wrong translations * fix tab on yml
Simple implemation with the adding in git-module (gogs/git-module#7) for implementing #1149
Certainly not the best implementation in term of efficiency.