Skip to content

A suite of tests for EmberJS to help with performance

Notifications You must be signed in to change notification settings

NullVoxPopuli/ember-performance

 
 

Repository files navigation

Ember Performance Suite

Development | Production


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.

To run in development mode

  1. pnpm install
  2. pnpm start
  3. Open http://localhost:4200

License

MIT

Adding a new app

  1. cd app-at-version

  2. npx [email protected] new ember-6-0 --no-welcome --pnpm --skip-install --skip-git --embroider

  3. Add dependencies

    pnpm add --save-dev @nullvoxpopuli/eslint-configs \
        common@workspace:^ ember-cli-utils@workspace:^ \
        ember-template-imports \
        pnpm-sync-dependencies-meta-injected \
        prettier-plugin-ember-template-tag \
        ember-route-template  

    It's important that these remain devdependencies, because we'll be adding the new app as a dependencies entry in benchmark/package.json later.

  4. Remove dependencies

    pnpm remove ember-data ember-fetch ember-cli-clean-css \
        stylelint stylelint-config-standard stylelint-prettier
  5. Add to config/environment.js

    const envUtils = require('ember-cli-utils/environment');
    
    // ...
    const ENV = {
      deps: envUtils.getDeps(__dirname),
      rootURL: '/ember-6-0/',
    }
  6. Add to ember-cli-build.js

    module.exports = async function (defaults) {
      const utils = await import('ember-cli-utils');
      const config = await utils.configure(__dirname, ['common']);
    
      const app = new EmberApp(defaults, {
        ...config,
        // Add options here
      });
  7. Add to app/router.js (or app/router.ts)

    Router.map(function () {
      this.route('bench', { path: ':name' });
    });
  8. Add a file, app/routes/application.js with contents:

    export { ApplicationRoute as default } from 'common';
  9. Change the build scripts package.json. Delete build and add:

    "build:prod": "pnpm _syncPnpm && ember build --environment=production",
    "build:dev":  "pnpm _syncPnpm && ember build --environment=development",
    "_syncPnpm": "pnpm sync-dependencies-meta-injected",
    
  10. Add a dependenciesMeta entry to your new project:

    "dependenciesMeta": {
      "common": {
        "injected": true
      }
    }
    
  11. Add the new app as a dependencies entry in benchmark/package.json

    "ember-6-0": "workspace:*"
    

About

A suite of tests for EmberJS to help with performance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.3%
  • TypeScript 26.3%
  • HTML 12.1%
  • Other 1.3%