You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/11/04 20:04:38 UTC

[GitHub] [incubator-echarts] dirslashls opened a new issue #13542: performance issue when there are a lot of grids

dirslashls opened a new issue #13542:
URL: https://github.com/apache/incubator-echarts/issues/13542


   ### Version
   5.0.0-beta.1
   
   ### Steps to reproduce
   Take the basic line chart example and change it so that instead of one grid, it renders multiple grids. Use the following code which creates 1000 grids. You would notice that the rendering time is not linear with the number of grids. For example, with 100 grids it renders within 200ms but setting it to 1000 grids changes to 14 to 18 seconds. 
   
   ```
   var grids = Array(1000).fill(null).map(() => {
      return ({
      });
   });
   
   var xAxis = grids.map((g,idx) => {
      return ({
          gridIndex: idx,
          type: 'category',
          data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      }) 
   });
   
   var yAxis = grids.map((g,idx) => {
      return ({
          gridIndex: idx,
          type: 'value',
      })
   });
   
   var series = grids.map((g,idx) => {
       return ({
           data: [820, 932, 901, 934, 1290, 1330, 1320],
           type: 'line'
       });
   });
   
   option = {
       grid: grids,
       xAxis: xAxis,
       yAxis: yAxis,
       series: series
   };
   ```
   
   ### What is expected?
   The rendering performance should be linear with the number of grids.
   
   ### What is actually happening?
   It seems to be O(n^2) or worse.
   
   ---
   When I profiled it in chrome it showed the the method isAxisUsedInTheGrid seems to consume maximum time. 
   
   Note that while in the above example all the grids occupy the same space, in my actual use case they don't overlap. I provided the unrealistic example just to point out the performance when there are many grids.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13542: performance issue when there are a lot of grids

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13542:
URL: https://github.com/apache/incubator-echarts/issues/13542#issuecomment-721946505


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org