Giter Site home page Giter Site logo

ember-performance's Introduction

Ember Performance Suite

The Ember Performance Suite is designed to help profile and diagnose the performance of the Ember.js framework. The general strategy is:

  • Browsers have a large variance in performance characteristics, so run each test in a new document, storing the results in localStorage.

  • Use benchmark.js for micro benchmarks and a different strategy for macro benchmarks.

  • Record Baseline performance so that we can compare Ember to the baseline performance of the platform it's run on.

Is your custom build crashing Safari during rendering tests?

There is a known bug with Safari and use strict. Some versions of Ember (1.8.1 and greater) have stripped out use strict to prevent it. Unfortunately, that fix causes the Ember performance suite to crash after running repeatedly.

In particular the lack of use strict shortly after defining ember-metal/mixin causes the crash. It has been added back in the builds of ember that ship with the performance suite, but you might encounter it if you are using a custom build.

To run in development mode

  1. npm install
  2. npm start

And open a browser to http://localhost:4200

To build for production mode

  1. npm install
  2. bower install
  3. broccoli build dist

The compiled version will be in your dist folder

To add a new test

Create a new directory under tests, for example tests/my-test and define an index.js file that calls TestClient.run.

Example:

TestClient.run({
  name: 'Ember.Object.create',
  microBench: true,

  test: function() {
    TestClient.PEOPLE_JSON.forEach(function(p) {
      Ember.Object.create(p);
    });
  }
});

(Please see the other tests for more examples.)

After you've created the test, add it to the manifest of tests in app/app.js

License

MIT

ember-performance's People

Contributors

eviltrout avatar stefanpenner avatar samsaffron avatar rwjblue avatar mixonic avatar chadhietala avatar victor-homyakov avatar darep avatar

Watchers

James Cloos avatar  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.