mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-09 19:06:13 +03:00
[PR #5950] [CLOSED] CN.842691263858076:4061f30454fb5d46371e3aadf592e6e3_69396e9b2723543851ba3e16.693a4c9c842c36225341e261.693a4c9c54d7087bf6e31bac:Trae CN.T(2025/12/11 12:46:20) #6603
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/BookStackApp/BookStack/pull/5950
Author: @gorvi
Created: 12/15/2025
Status: ❌ Closed
Base:
development← Head:trac-test-model-seed1.6📝 Commits (4)
0ad1537feat(阅读进度): 添加页面阅读进度跟踪功能9214faefeat(数据库): 为search_terms和entities表添加复合索引以优化搜索性能ed2caecfeat(阅读进度): 添加阅读进度条功能3680fd0Merge branch 'trac-test-model-seed1.6' of github.com:gorvi/BookStack into trac-test-model-seed1.6📊 Changes
8 files changed (+329 additions, -0 deletions)
View changed files
➕
app/Http/Controllers/Api/ReadingProgressController.php(+61 -0)➕
app/Models/ReadingProgress.php(+47 -0)➕
database/migrations/2024_05_11_000000_create_reading_progress_table.php(+38 -0)➕
database/migrations/2025_10_20_000000_add_search_indexes.php(+40 -0)➕
resources/js/components/Page/ReadingProgressBar.vue(+133 -0)📝
resources/js/components/index.ts(+1 -0)📝
resources/views/pages/show.blade.php(+2 -0)📝
routes/api.php(+7 -0)📄 Description
第一轮你已经分析了搜索性能问题并创建了数据库索引迁移文件,但仍有以下未完成事项:
需要解决的问题:
尝试使用:
php artisan migrate --path=database/migrations/2025_10_20_000000_add_search_indexes.php或提供替代方案(如手动执行SQL)
实现缓存层(Redis或文件缓存)
修复SearchRunner.php中的N+1查询问题
优化查询逻辑(如减少JOIN、使用分页)
具体要求:
完成数据库迁移:确保索引成功添加
实现缓存机制:创建SearchCache类并集成到SearchRunner
优化查询代码:至少修改applyTermSearch方法以减少内存使用
创建验证方案:编写简单的性能测试脚本
提供实施指南:说明如何测试优化效果
请继续完成上述任务,完成后:
提供迁移执行状态
展示关键优化代码
说明性能验证步骤
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.