xfy
b269fcf205
perf(posts): list/search 零 capacity Vec 改 collect 预分配 + helpers retain
list.rs 5 处、search.rs 1 处用 Vec::new()+循环 push,初始 capacity 为 0,
循环触发多次指数 realloc。rows.iter().map().collect() 用 slice 迭代器的
精确 size_hint 一次性预分配。首页/列表/搜索/标签分页路径。
helpers.rs row_to_post_list_item / row_to_post_full:tags 从
into_iter().filter().collect() 改 retain 原地过滤。unwrap_or_default()
已返回 owned Vec,旧写法重建第二个 Vec。每行文章记录省一次 Vec 分配。
顺带修 slugify 一个 dead store(prev_dash=false 后被 true 无条件覆盖)。
2026-07-15 11:46:56 +08:00
..
2026-07-13 10:09:15 +08:00
2026-07-14 15:09:41 +08:00
2026-07-13 15:57:34 +08:00
2026-07-15 11:46:56 +08:00
2026-06-29 13:47:40 +08:00
2026-06-29 11:02:58 +08:00
2026-07-04 21:54:54 +08:00
2026-06-25 16:45:09 +08:00
2026-07-14 15:13:21 +08:00
2026-07-15 11:41:55 +08:00
2026-07-03 18:09:27 +08:00
2026-07-03 18:15:59 +08:00
2026-07-09 18:12:54 +08:00
2026-06-29 13:47:40 +08:00
2026-07-15 11:46:56 +08:00
2026-07-15 11:28:21 +08:00