Repository navigation
perf: 在阅读等待期间释放空闲浏览器以降低内存占用 - #75
Open
GoldenSection0618 wants to merge 2 commits into
Open
GoldenSection0618 wants to merge 2 commits into
GoldenSection0618 wants to merge 2 commits into
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.
阅读任务通常需要等待较长时间,当前移动浏览器在等待期间仍保持运行;本次改动在满足条件时,于首次阅读成功后、进入等待前关闭移动浏览器,并在后续移动端打卡或搜索需要时恢复会话,从而减少等待期间的内存占用,或许也有助于缓解 #72 提到的卡顿。
本机运行数据:
保留原有阅读间隔;并行搜索、额外搜索、后台 Edge 活动等需要继续使用浏览器的场景维持原有生命周期,后续需要移动浏览器时重新建立会话。
单元测试覆盖浏览器释放、会话恢复、恢复失败及保留原有浏览器生命周期的场景;相关单元测试共 131 项通过,类型检查及改动文件的 lint、格式检查通过。