mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-23 09:18:15 -06:00
Post-processing runs the mention, email and cross-repo commit reference regexps on every text node of rendered markdown, issue titles and commit messages. All three patterns need an `@`, but none starts with a literal the regexp engine can search for, so they took most of the post-processing time even on text without one. Checking for `@` first skips them with the same results. Local Go benchmarks, i7-9700 on Windows 11, base and patched run alternately 6 times, medians: | | before | after | |---|---|---| | Markdown render of README + CONTRIBUTING + 3 docs (45 KB) | 16.1 ms | 11.4 ms | | `PostProcessCommitMessageSubject` on the last 200 commit subjects of this repo | 5.14 ms | 3.53 ms | | `PostProcessIssueTitle` on the same 200 lines | 3.57 ms | 2.59 ms | Assisted-by: Claude Code:claude-opus-5-5