Commit 1193512
committed
perf(android): optimize seekbar sync and filter out trivial media progress updates
- Implement `hasSignificantMediaChange()` to perform deep metadata comparisons (playback state, title, artist, album art, buffering state, like status, and track duration).
- Ignore minor progress elapsed time ticks during comparison to eliminate the CPU-intensive, every-second WebSocket synchronization loop.
- Significantly reduce battery consumption, CPU overhead, and WebSocket network payloads on the Android client.1 parent caf9cc8 commit 1193512
1 file changed
Lines changed: 15 additions & 2 deletions
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
| |||
472 | 485 | | |
473 | 486 | | |
474 | 487 | | |
475 | | - | |
| 488 | + | |
476 | 489 | | |
477 | 490 | | |
478 | 491 | | |
| |||
527 | 540 | | |
528 | 541 | | |
529 | 542 | | |
530 | | - | |
| 543 | + | |
531 | 544 | | |
532 | 545 | | |
533 | 546 | | |
| |||
0 commit comments