Shudhanshu Singh
d87d26d735
perf(gitdiff): optimize inline diff highlighting using cache ( #38706 )
...
This pull request optimizes code diff highlighting in the PR Files
Changed view, which is a major CPU bottleneck and hot path in
production.
Previously, Gitea executed the expensive `DiffMatchPatch` algorithm
twice for every matching deleted/added line pair (once for the deleted
line, and once for the added line). We now run the diff algorithm once
and cache the resulting `DiffInline` on the `DiffLine` struct itself,
allowing the second line to render via a 0-cost cache lookup.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2026-07-30 16:43:36 +00:00
..
2026-07-28 17:04:22 +00:00
2026-07-28 17:04:22 +00:00
2026-05-26 15:49:31 -07:00
2026-07-03 20:07:37 +02:00
2026-07-30 16:43:36 +00:00
2026-07-20 16:07:38 +00:00
2026-05-26 15:49:31 -07:00
2026-07-28 17:04:22 +00:00
2026-05-26 15:49:31 -07:00
2026-07-07 07:08:05 +00:00
2026-07-20 16:07:38 +00:00
2026-05-26 15:49:31 -07:00
2026-07-17 18:44:31 +08:00
2026-05-26 15:49:31 -07:00
2026-07-20 16:07:38 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-17 18:44:31 +08:00
2026-07-28 17:04:22 +00:00
2026-05-26 15:49:31 -07:00
2026-07-20 16:07:38 +00:00
2026-07-15 17:30:01 +00:00
2026-05-26 15:49:31 -07:00
2025-03-31 01:53:48 -04:00
2026-07-23 17:42:55 +00:00
2026-05-26 15:49:31 -07:00
2026-07-20 16:07:38 +00:00
2026-05-26 15:49:31 -07:00
2026-07-25 20:39:36 +08:00
2026-05-26 15:49:31 -07:00
2026-07-23 09:33:47 +00:00
2026-07-23 09:33:47 +00:00
2026-05-26 15:49:31 -07:00
2026-07-17 18:44:31 +08:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-07 14:40:12 +08:00
2026-07-27 07:46:00 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-27 07:46:00 +00:00
2026-05-26 15:49:31 -07:00
2026-06-09 06:12:09 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-15 17:30:01 +00:00
2026-05-26 15:49:31 -07:00
2026-07-15 17:30:01 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-23 08:51:49 -07:00
2026-06-28 09:31:35 +00:00
2026-07-17 07:44:05 +00:00
2026-05-26 15:49:31 -07:00
2026-07-17 18:44:31 +08:00
2026-07-27 17:45:27 +00:00
2026-05-26 15:49:31 -07:00
2026-07-04 15:02:17 +02:00
2026-07-20 16:07:38 +00:00
2026-07-17 18:44:31 +08:00
2026-07-17 18:44:31 +08:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-15 17:30:01 +00:00
2026-07-30 16:43:36 +00:00
2026-05-26 15:49:31 -07:00
2026-07-27 17:45:27 +00:00
2026-07-21 11:44:25 +08:00
2026-07-29 12:39:35 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-07-28 17:04:22 +00:00
2026-07-28 19:12:53 +08:00