Repository navigation
feat(inventory): 在 SMB 库里搜索画廊 - #186
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SearchBar、SearchLayout、搜索按钮原样复用,没改上游文件):左边返回,右边「+」打开高级搜索,分类勾选、评分、页数和标签选择器都能用;订阅搜索和以图搜图要用到网站,选了只给一句提示$、-、引号的写法和在线搜索一样,分类表「勾上就排除」的语义也一样metadata.json的 mtime(并发数跟随「元数据并发」设置),只重读新增或改过的记录;核对结果和先出的不同才替换,核对失败时保留先出的结果并提示「可能不是最新」files/inventory-search/,不进数据库,整个搜索不写 share、不访问 e-hentaie20353c7起就有),新的搜索栏也会;现在两处都只锁左抽屉验证:LXC 上 CI 同款构建通过,单测 468 个 0 失败;新增 InventoryQueryTest、InventorySearchCacheTest、InventorySearchTest,SmbInventoryTest、SmbPathsTest 补了用例;InventorySearch 做过变异验证,4 个变异体全部被抓到。平板(SM-X926B,Android 16,调试版,147 个文件夹、145 份元数据,元数据并发 64)经
start_scene直接进库页,不开抽屉、详情页和阅读器,测完设置没有改动。家里 Wi-Fi:标题结果 111–235 ms(同时段一页 50 本 68–216 ms);缓存已建好时完整结果中位 161 ms,9 次里 8 次在 0.3 s 内;第一次建缓存 353–370 ms。手机热点 + WireGuard(往返 88–367 ms):缓存已建好时 1.12–1.97 s,8 次都在 2 s 内;第一次建缓存 2.45、2.79 s(这两项是在下面说的并行版上测的,这两种情况没有要读 share 的快速结果,两版走同一条路径);标题结果 0.69–1.00 s(同时段一页 1.09–1.72 s)。设备上还确认了核对后会补进只靠标签匹配的画廊、返回键会清掉搜索、订阅搜索只弹提示、排除分类生效、右抽屉划不出来。试过让核对和标题那页并行:隧道上标题结果慢到 1.40–1.44 s,完整结果也没变快,所以保留顺序。未验证:先出标题、再出完整结果时,局域网 463–521 ms(装包后第一次 730 ms)超过 0.5 s,隧道有一次 4.18 s 超过 4 s,都是标题命中多、要先读完一整页的情况(单独建缓存两条链路都达标);缓存已建好时局域网有一次查 mtime 卡了 1.24 s,没再复现;原子改名后文件夹的修改时间会不会跟着变没有测,缓存只看
metadata.json自己的 mtime;标签选择器没在设备上点过;各语言译文没有母语者校对。Closes #185