Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Optimization of Data refresh rate #183

Open
pantinker opened this issue Jun 2, 2024 · 0 comments
Open

Feature request: Optimization of Data refresh rate #183

pantinker opened this issue Jun 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pantinker
Copy link
Collaborator

粒子風暴 2024-05-26:

  1. An機選Dev mode顯示表層更新(更新時會顯示為紅色),發現ETA 頁面疑似Refresh頻率過高,表層不停閃,表示超密更新,目測約0.1秒更新一下,係太密而無必要 (依家ETA幾耐Refresh一次?每條路線係咪無差別refresh?)

  2. 同樣地「規劃」也疑似更新太密,甚至密到接近唔閃而係填滿全版紅色 (乜都唔做情況下,都會Refresh唔知乜野),正常期望係未開始search規劃,係唔會不停refresh

改善1:
依每條路線ETA時間Cater番適合嘅refresh rate。
i) ETA 3分鐘或以下,每0.5 - 1 秒refresh一次呢d路線已夠
ii) ETA 仲有3分鐘以上(架車未到唔使refresh咁多),每15秒 refresh呢d路線一次
及,或人手click轉Tab時,一次性refresh全部路線(Hide左果d唔計)ETA一次

改善2:
找出「規劃」不停refresh原因,繼而再研究resolution

補充多少少數據 去支持Enhancement
如solution係feasible,相信Data usage同CPU usage表現會有明顯改善

情景:
16條路線,其中5條在3分鐘內到達,及11條尚未到達

每1分鐘App使用資源計算
Before (例 Data Fetch 10次/秒)
CPU/連線: 10次x60秒
= 600次/分鐘
Data: 16條路線x10次x60秒
= 9600次路線/分鐘
After (Data 3分鐘內 1次/秒,其他1次/15秒)
CPU/連線: 60/1+60/15 = 60+4
= 64次/分鐘
Data: 5條路線x60/1 + 11條路線x60/15
= 300 + 44 = 344 次路線/分鐘

@pantinker pantinker added the enhancement New feature or request label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant