sjcobb opened a new issue, #20022: URL: https://github.com/apache/echarts/issues/20022
### What problem does this feature solve? In complex applications using frameworks like React, it is difficult to achieve optimal performance due to expensive cloning operations that have no way to opt out of. If the goal of these cloning operations ([example](https://github.com/apache/echarts/blob/4b2d52fd0f5732a6d97b3b808d592982f4138781/src/model/OptionManager.ts#L111)) is to protect ECharts internals from mutations from users of the library, then it may be unnecessary as mutations are an anti-pattern in these contexts. Having an optional (and initially experimental) property to tell ECharts to bypass cloning would put more responsibility on users to not abuse setOption calls, but could have a high upside for power users struggling with memory / growing JS heap size. It may also help with open memory leak issues: #7002, #10130, [echarts-for-react/issues/533](https://github.com/hustcc/echarts-for-react/issues/533) (these may not actually be memory leaks but are a symptom of lingering performance issues). ### What does the proposed API look like? Introduce an optional `immutableMode` property to setOption opts, aimed at optimizing performance for large datasets, where charts needs to re-render frequently. A very rough concept can be seen here: https://github.com/sjcobb/echarts/pull/1 Open to feedback on other ideas, [my branch](https://github.com/sjcobb/echarts/pull/1/files#r1635638734) is far from a working prototype, but I want to see if this idea has any traction before diving in further. -- 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]
