GithubHelp home page GithubHelp logo

drio / perfsvgcanvashc Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 407 KB

Exploring the performance of line chart with different engines: Canvas, svg and highcharts (svg)

CoffeeScript 29.72% HTML 12.36% JavaScript 49.21% Shell 3.34% CSS 5.37%

perfsvgcanvashc's People

Contributors

drio avatar

Watchers

 avatar

perfsvgcanvashc's Issues

Report I

I wanted to report on what I have accomplished so far. I have the d3 (svg and canvas)
rendering engines working. The canvas engine is currently based on this concept to avoid losing the data binding
capabilities.

If you clone the repo and run it locally, you can change the mode from: single to benchmark.

In the first one, you can render a line chart with any of the engines. In the second one, we render
many datasets with different engines and time the javascript execution. At the end, we report the
results:

screen shot 2016-03-28 at 10 11 48 am

To run locally:

$ ./sh/watch.sh # if you want to hack on it (requires ruby filewatcher)
$ ./sh/server.sh

And point your browser to: localhost:9002.

As you can see svg is outperforming the other engines. Keep in mind that we are using the custom
DOM elements hack to keep d3's data binding. That seems to be driving the computation time:

timeline-canvas

But canvas still outperforms HC:

timeline-hc

And I was surprise to see how fast svg is even with 25k data points:

timeline-svg

Next, I want to try canvas without the custom elements hack to see how it performs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.