⚡️ perf(runtime): cache static page-load script data#1502
Closed
cyfung1031 wants to merge 1 commit into
Closed
Conversation
Also fix named file:// @resource refresh by checking the parsed resource path.
Collaborator
Author
|
我用 Fable 5 重新写了一份Spec去研究到底 1404 要如何重写了。(目前 1404 和 1502 都不太理想。需砍掉重做) |
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.
主要是把 #1404 中某部份拆出来,然后关掉 #1404.
( #1404 有点过度复杂 )
Also fix named file:// @resource refresh by checking the parsed resource path.
Checklist / 检查清单
Description / 描述
核心改动:
RuntimeService.getScriptsForTab增加页面加载专用静态资料缓存。compiled resource、resource、script code、metadata/userConfig 字串和解析结果、URL patterns。value.getScriptValue仍每次页面加载重新读取,不进入缓存。file:///resource 命中缓存时仍逐次刷新;hash 变化才更新返回 resource 和已注册 userScript。@resource asset file:///...使用原始整行判断导致无法热刷新的问题,改为判断解析后的路径。新增/调整测试:
run-in/noframes过滤后顺序稳定。@require file:///...、@require-css file:///...、命名@resource file:///...热刷新和 userScript 更新。Screenshots / 截图