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.
pnpm install
pnpm start
Open http://localhost:4200
MIT
-
cd app-at-version
-
npx [email protected] new ember-6-0 --no-welcome --pnpm --skip-install --skip-git --embroider
-
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 inbenchmark/package.json
later. -
Remove dependencies
pnpm remove ember-data ember-fetch ember-cli-clean-css \ stylelint stylelint-config-standard stylelint-prettier
-
Add to
config/environment.js
const envUtils = require('ember-cli-utils/environment'); // ... const ENV = { deps: envUtils.getDeps(__dirname), rootURL: '/ember-6-0/', }
-
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 });
-
Add to
app/router.js
(orapp/router.ts
)Router.map(function () { this.route('bench', { path: ':name' }); });
-
Add a file,
app/routes/application.js
with contents:export { ApplicationRoute as default } from 'common';
-
Change the build scripts
package.json
. Deletebuild
and add:"build:prod": "pnpm _syncPnpm && ember build --environment=production", "build:dev": "pnpm _syncPnpm && ember build --environment=development", "_syncPnpm": "pnpm sync-dependencies-meta-injected",
-
Add a dependenciesMeta entry to your new project:
"dependenciesMeta": { "common": { "injected": true } }
-
Add the new app as a
dependencies
entry inbenchmark/package.json
"ember-6-0": "workspace:*"