Files
gitea/modules
8b46a956d8 perf(references): scan only the keyword window before a reference (#39396)
Fixes https://github.com/go-gitea/gitea/issues/39395

`findActionKeywords` ran the close and reopen keyword patterns over all
content before each reference, making `FindAllIssueReferences` quadratic
on comments and commit messages. The patterns are anchored at the
reference, so only the last few bytes can match. Scan only that window,
sized from the longest keyword with room for `(?i)` matching wider runes
like `ſ` for `s`.

`"#1 "` repeated 4000 times: 2.04 s before, 16 ms after.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-09-24 07:12:02 +00:00
..
2026-09-23 23:14:31 +00:00
2026-08-24 07:28:17 +00:00
2026-08-24 18:26:10 +00:00
2026-08-26 19:32:44 +00:00
2026-09-23 23:14:31 +00:00
2026-07-12 17:14:09 +00:00