Srajan-Sanjay-Saxena opened a new pull request, #21339:
URL: https://github.com/apache/echarts/pull/21339

   <!-- Please fill in the following information to help us review your PR more 
efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Fixes canvas laggy rendering for geo maps with many labels by optimizing 
ZRender refresh cycles to prevent unnecessary re-renders.
   
   ### Fixed issues
   
   - #21331: Canvas laggy rendering with geo maps containing many labels
   
   ## Details
   
   ### Before: What was the problem?
   
   Geo maps with many data points and labels caused performance issues due to 
excessive refresh cycles in ZRender:
   - Multiple refresh() calls restarted animation loop unnecessarily (8 
animation starts for 5 refresh calls)
   - Fixed 10-frame sleep threshold wasn't optimal for complex scenes
   - Redundant hover refresh requests wasted resources
   - Demo showing issue: https://www.makeapie.cn/echarts_content/xVNl_-jjok.html
   
   ### After: How does it behave after the fixing?
   
   Performance optimizations in ZRender prevent unnecessary re-renders:
   - ✅ Duplicate refresh prevention: 8 → 1 animation starts
   - ✅ Adaptive sleep threshold: Complex scenes sleep sooner (3-5 frames vs 10)
   - ✅ Hover refresh optimization: Prevents redundant flag setting
   - ✅ Automated test verification: `test/test-optimizations.html`
   
   ## Document Info
   
   One of the following should be checked.
   
   - [x] This PR doesn't relate to document changes
   - [ ] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   ## Misc
   
   ### Security Checking
   
   - [x] This PR uses security-sensitive Web APIs.
   
   ### ZRender Changes
   
   - [x] This PR depends on ZRender changes (ecomfe/zrender#1142).
   
   ### Related test cases or examples to use the new APIs
   
   - `test/test-optimizations.html` - Automated verification of all performance 
optimizations
   - Tests duplicate refresh prevention (8 → 1 animation starts)
   - Tests adaptive sleep threshold functionality  
   - Tests hover refresh optimization
   - Provides automated verification of zrender performance improvements
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   
   Performance improvements verified with automated tests showing significant 
reduction in unnecessary animation restarts and better resource management for 
complex visualizations.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to