graphs

package managers

and one million vertices


requestAnimationFrame(frame)








requestAnimationFrame(frame)

function frame() {




}

requestAnimationFrame(frame)

function frame() {
  // Keep calling us:
  requestAnimationFrame(frame)


}

requestAnimationFrame(frame)

function frame() {
  // Keep calling us:
  requestAnimationFrame(frame)

  // Update your scene here
}

function frame() {
  requestAnimationFrame(frame)
  renderParticles()

  // 16 ms
}

Reduce intersections

Bad

Good

Same length

Bad

Good

Symmetry

Bad

Good


var layout = require('ngraph.forcelayout')(graph)





var layout = require('ngraph.forcelayout')(graph)

layout.step()



var layout = require('ngraph.forcelayout')(graph)

layout.step()

layout.getNodePosition(nodeId)

function frame() {
  requestAnimationFrame(frame)
  layout.step()
  renderGraph()
  // 16 ms
}

function frame() {
  // 16 ms
}

function frame() {
  requestAnimationFrame(frame)
  // layout.step()
  renderGraph()
}

function frame() {
  requestAnimationFrame(frame)
  // layout.step()
  renderGraph()
}

Server


var layout = require('ngraph.forcelayout')(graph)
while (!done) {
  layout.step()
}
saveToDisk()

Browser


function frame() {
  requestAnimationFrame(frame)
  renderGraph()
}

Stop 1: Bower

Something is missing...

PHP's Composer

Limit length

Mobile?

goo.gl/yRdHjE

It is fast

composer 64,123
gems 89,450
npm 163,184
go 182,215

Last stop is...

1,000,000

Thank you!

github.com/anvaka/pm