almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Graph2d - Performance regression between 4.19 and 4.21 #3778

Open TomerYakir opened 6 years ago

TomerYakir commented 6 years ago

Graph2d scrolling/zooming is extremely slow in 4.21.

The examples on the website and the following code runs very slowly:

var container = document.getElementById("myChart"); var groups = new vis.DataSet(); groups.add({ id: 0, content: 'groupOne', className: 'darkred' }) groups.add({ id: 1, content: 'groupTwo', className: 'darkgreen' })

var items = [
  {x: '2017-11-16 09:00', y: 350, group: 0},
  {x: '2017-11-16 09:01', y: 380, group: 0},
  {x: '2017-11-16 09:02', y: 210, group: 0},
  {x: '2017-11-16 09:05', y: 16300, group: 1},
  {x: '2017-11-16 09:10', y: 19300, group: 1},
  {x: '2017-11-16 09:15', y: 3602, group: 1},
  {x: '2017-11-16 09:20', y: 8041, group: 0},
  {x: '2017-11-16 09:25', y: 400, group: 1},
  {x: '2017-11-16 09:30', y: 1210, group: 0},
  {x: '2017-11-16 09:35', y: 940, group: 1},
  {x: '2017-11-16 09:40', y: 2240, group: 0},
  {x: '2017-11-16 09:45', y: 1649, group: 1}

];

var dataset = new vis.DataSet(items);

var options = { style:'points', start: '2017-11-16 08:50', end: '2017-11-16 09:50', legend: true, dataAxis: { left: { title: { text: 'ms' } } } }; var graph2d = new vis.Graph2d(container, dataset, groups, options);

Running on Chrome on OSX El Capitan.

blin4444 commented 6 years ago

I've noticed this too, and am using 4.19 for now. I wouldn't say it's "slow"; it seems rendering only happens at the end of a scroll or zoom event; there are no intermediate renderings like there were in version 4.19 and below.

Edit: actually, it seems the axes don't even update. #3651

jgorene commented 6 years ago

Same observation and I still use version 4.20.1 which normally works on that side ...

LiorArbel commented 6 years ago

Is this expected to be fixed in the near future?

I think this is a major bug, the garph is currently completely unusable. And unfortunately I can't downgrade viss version since I need the new features of the timeline :/