forgejo/templates/repo
emilylange c1f85ce27b
feat(performance): remove BranchName in /:owner/:repo/commit/:commit
`BranchName` provides the nearest branch of the requested `:commit`.

It's plenty fast on smaller repositories.
On larger repositories like nixpkgs, however, this can easily take 2-3
seconds on a modern machine on a NVMe.

For context, at the time of writing, nixpkgs has over 650k commits and
roughly 250 branches.

`BranchName` is used once in the whole view:
The cherry-pick target branch default selection.

And I believe that's a logic error, which is why this patch is so small.

The nearest branch of a given commit will always be a branch the commit
is already part of. The branch you most likely *don't* want to
cherry-pick to.

Sure, one can technically cherry-pick a commit onto the same branch, but
that simply results in an empty commit.

I don't believe this is intended and even less so worth the compute.

Instead, the cherry-pick branch selection suggestion now always uses
the default branch, which used to be the fallback.

If a user wants to know which branches contain the given commit,
`load-branches-and-tags` exists and should be used instead.

Also, to add insult to injury, `BranchName` was calculated for both
logged-in and not logged-in users, despite its only consumer, the
cherry-pick operation, only being rendered when a given user has
write/commit permissions.

But this isn't particularly surprising, given this happens a lot in
Forgejo's codebase.
2024-08-08 22:29:42 +02:00
..
actions Add support for workflow_dispatch (#3334) 2024-06-28 05:17:11 +00:00
branch ui: update pull request icons (#4455) 2024-07-16 14:38:46 +00:00
cite Remove APA as cite format 2024-07-20 15:48:57 +02:00
code Fix overflow on push notification (#31179) 2024-06-09 11:13:39 +02:00
diff ui: improve button gap consistency in repos (#4365) 2024-07-07 03:21:58 +00:00
editor Convert max file name length to 255 (#30489) 2024-04-21 11:53:41 +02:00
find Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
graph Size/gap changes and cleanup in commit graph (#4214) 2024-06-24 18:59:57 +00:00
issue [BUG] Ensure all filters are persistent in issue filters 2024-08-06 17:12:10 +02:00
migrate ui: refactor repo migration items 2024-07-27 16:35:48 +05:00
projects Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
pulls Improve diff stats bar (#30669) 2024-04-28 15:39:01 +02:00
release Implement external assets 2024-07-29 20:35:55 +02:00
settings ui: fix wrong string used in a search box (#4258) 2024-06-28 16:28:03 +00:00
tag Adjust the signed tag verification line 2024-04-02 23:02:34 +02:00
wiki Replace gt-word-break with tw-break-anywhere 2024-06-11 08:57:27 +05:00
activity.tmpl Show repo activities even if only code unit active or git repo is empty but issue is active (#3455) 2024-04-28 13:47:52 +00:00
admin_flags.tmpl
blame.tmpl ui(blame): remove broken padding (#4318) 2024-07-04 11:46:31 +00:00
branch_dropdown.tmpl Fix long branch name overflows (https://github.com/go-gitea/gitea/pull/30345) 2024-05-24 22:11:37 +05:00
clone_buttons.tmpl Refactor clone-panel styles (#29861) 2024-03-26 19:04:24 +01:00
clone_script.tmpl Customizable "Open with" applications for repository clone (#29320) 2024-03-23 11:58:54 +01:00
code_frequency.tmpl
commit_load_branches_and_tags.tmpl Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
commit_page.tmpl feat(performance): remove BranchName in /:owner/:repo/commit/:commit 2024-08-08 22:29:42 +02:00
commit_status.tmpl
commit_statuses.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
commits.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
commits_list.tmpl [PORT] gitea#30396: Fix author name alignment in commits table 2024-04-15 20:09:34 +02:00
commits_list_small.tmpl Fix some UI regressions for commit list (#30920) 2024-05-12 20:03:10 +02:00
commits_search_dropdown.tmpl Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
commits_table.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
contributors.tmpl Fix Activity Page Contributors dropdown (#31264) 2024-06-18 20:05:23 +02:00
create.tmpl feat(i18n): allow different translations of creation links and titles (#4829) 2024-08-07 16:54:05 +00:00
create_helper.tmpl Remove incorrect and unnecessary Escape from templates (#29394) 2024-02-26 22:30:27 +01:00
empty.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
file_info.tmpl [UI] Do not include trailing EOL character when counting lines 2024-08-06 04:36:57 +02:00
flags.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
forks.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
graph.tmpl Size/gap changes and cleanup in commit graph (#4214) 2024-06-24 18:59:57 +00:00
header.tmpl feat(UI): add package counter to repo/user/org overview pages 2024-07-31 12:40:24 +02:00
header_fork.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
home.tmpl Replace gt-word-break with tw-break-anywhere 2024-06-11 08:57:27 +05:00
icon.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
latest_commit.tmpl Fix DEFAULT_SHOW_FULL_NAME=false has no effect in commit list and commit graph page (#30096) 2024-04-07 10:52:45 +02:00
navbar.tmpl Implement recent commits graph (#29210) 2024-02-26 22:30:26 +01:00
packages.tmpl
pulse.tmpl feat(UI): fix links, add labels for releases on repo activity page 2024-08-02 07:56:03 +02:00
recent_commits.tmpl Implement recent commits graph (#29210) 2024-02-26 22:30:26 +01:00
release_tag_header.tmpl ui: improve button gap consistency 2024-06-28 13:11:32 +05:00
search.tmpl [FEAT] branch/tag dropdown for git-grep (#4262) 2024-06-29 06:57:34 +00:00
search_name.tmpl
shabox_badge.tmpl
star_unstar.tmpl Further consistency in the repo header 2024-03-27 09:33:06 +01:00
sub_menu.tmpl Rename ByteSize to ReadableSize 2024-03-31 20:17:12 +05:00
unicode_escape_prompt.tmpl templates: remove superfluous SanitizeHTML 2024-03-11 23:36:58 +07:00
upload.tmpl
user_cards.tmpl ui: refactor user-cards as a grid 2024-08-02 19:27:31 +05:00
view_file.tmpl accessibility: anchor elements' missing href added (#4375) 2024-07-08 17:32:59 +00:00
view_list.tmpl feat(UI): add links to icons in repository file list 2024-08-01 13:32:01 +02:00
watch_unwatch.tmpl Further consistency in the repo header 2024-03-27 09:33:06 +01:00
watchers.tmpl