Git Product home page Git Product logo

svg-perf-test's Introduction

svg-perf-test

Tests that try to answer the question -

What type of Icon performs the best ?

Font Icons, SVGs inlined in a Web Page, or SVGs as Background Images in CSS

Read more about the experiment on the blog post.

Running the tests

Requires Node 0.11 or greater and npm and Chrome 41+

  1. Download ChromeDriver and start it using ./chromedriver
  2. Clone this repository and ensure that you checkout the this branch
  3. Install all npm dependencies using npm install
  4. Install sub modules using git submodule init and git submodule update
  5. Start the test using node lib/index.js

Tests are run on Chrome on an Android device by default. Ensure that you have an android device connected, and have run adb server start. Change the browser-perf options to chrome to run on desktop Chrome.

What happens in the test

  1. First, three web pages are created for each of the 700+ icons in the ioniocs/src/ folder, one each for inline SVG, background SVG and Font Icon
  2. A local Node Server is started
  3. Each webpage is loaded on the browser (Android on Chrome by default)
  4. Pages are scrolled, and tracing/timeline data is collected
  5. Browser-perf calculates metrics like frame rates, paints, etc and stores results in data.json.

Helper Scripts

The repo also contains a createMetadata.js to create a _meta.json file that has a list of all icons, and metrics that need to show up when the data.json is converted to a csv file. dataToCSV.js converts data.json to _results.csv to view and analyze the results.

svg-perf-test's People

Contributors

axemclion avatar

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.