mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
- Implemented a callback pool in the Web Worker to handle concurrent requests without overwriting onmessage. - Modified postMessage to generate unique IDs for messages and store corresponding callbacks. - Improved state management by using in-place deletion for removing danmu from state pools. - Optimized the rendering loop to batch calculate the top positions of danmu elements, reducing DOM reads and improving performance. - Added a new function getDanmuTopBatch in the worker to handle batch requests for top calculations.