Event loop scheduling improvement
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, swift, wasm
- 領域
- performance, web-dev
研究方向
從 Sources/JavaScriptEventLoop/JobQueue.swift 中的執行器迴圈開始,尤其關注連結的部分,並追蹤排入佇列的 Swift 工作如何執行,以及控制權如何返回瀏覽器事件迴圈。定義並評估一種排程方法,使其在執行器執行達到有界時長後讓出執行權;透過顯示較高優先級的待處理工作不再被低優先級工作阻塞,並測量對效能的影響,來證明該方法已完成。
由索引模型根據 Issue 內容生成。
描述
Motivation
Think the following situation:
- The browser event loop has a pending event that fires an event listener that schedules high-priority work to JSKit's executor.
- But the current JSKit's executor loop does not yield its control to JS event loop until all enqueued works are done
- Even if some of them are low-priority
It resulted in the higher priority works planned to be enqueued to JSKit's executor are blocked by lower priority works that are already enqueued even though browser engine knows about the pending event.
Outcome
- Performance gain
Potential solution
Although yielding control to JS engine for every Swift job is not a realistic approach due to high overheads, but it's still considerable to yield control when certain time is spent for the current JSKit's executor loop.
- 主要語言
- Swift
- 星號
- 986
- 分支
- 76
- 平均合併
- 21 小時 11 分鐘
- 30 天內合併 PR
- 4
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
swiftwasm/JavaScriptKit 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 55/100
swiftwasm/JavaScriptKit#793 ·
-
swiftwasm/JavaScriptKit#785 · 已指派 1 人 ·
-
[SwiftBuild] Preserve duplicate archive members when SwiftBuild expands static archives for linking 未關閉
難度 4/5 3-5 天 新手友好度 48/100
swiftwasm/JavaScriptKit#781 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
swiftwasm/JavaScriptKit#773 ·
-
swiftwasm/JavaScriptKit#767 · 已指派 1 人 ·
查看 swiftwasm/JavaScriptKit 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
maxgoedjen/secretive#840 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
manaflow-ai/cmux#13763 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
openwallet-foundation/multipaz#2028 ·