# Ember

Ember scores 5 of 28 points on 14 speed features: 2/14 on first-paint levers and 3/14 on other features. Rank 23 of 23. Labels: 1 1st-party, 0 Experimental, 3 Third-party, 10 Manual.

- Version checked: ember-source ~7.2.0 (latest 7.4.1; the linked /release guides are v7.3), vite-ember-ssr ^0.4.1 (latest 0.7.0) (Embroider/Vite + vite-ember-ssr, not FastBoot)
- Performance guide: [Rendering Performance - Ember Inspector - Ember Guides](https://guides.emberjs.com/release/ember-inspector/render-performance/)
- Issue tracker: https://github.com/emberjs/ember.js/issues
- Books demo port: [ember-books](https://github.com/MaxwellCohen/ember-books)

## Summary

| Feature | Group | Label | Points |
| --- | --- | --- | --- |
| [Production CSS inlining](https://framework-compare.vercel.app/features/css-inlining.md) | First-paint levers | Manual | 0 |
| [Font optimization](https://framework-compare.vercel.app/features/font-optimization.md) | First-paint levers | Third-party | 1 |
| [Image pipeline](https://framework-compare.vercel.app/features/image-pipeline.md) | First-paint levers | Third-party | 1 |
| [Data/HTML caching](https://framework-compare.vercel.app/features/caching.md) | First-paint levers | Manual | 0 |
| [Route prefetching](https://framework-compare.vercel.app/features/route-prefetching.md) | First-paint levers | Manual | 0 |
| [Streaming SSR](https://framework-compare.vercel.app/features/streaming-ssr.md) | First-paint levers | Manual | 0 |
| [Early Hints / preload headers](https://framework-compare.vercel.app/features/early-hints.md) | First-paint levers | Manual | 0 |
| [Islands / partial hydration / lazy slices](https://framework-compare.vercel.app/features/islands.md) | Other features | Manual | 0 |
| [Per-route render modes](https://framework-compare.vercel.app/features/render-modes.md) | Other features | Manual | 0 |
| [Fine-grained client reactivity](https://framework-compare.vercel.app/features/reactivity.md) | Other features | 1st-party | 2 |
| [Built-in bundle analysis](https://framework-compare.vercel.app/features/bundle-analysis.md) | Other features | Third-party | 1 |
| [Third-party script strategies](https://framework-compare.vercel.app/features/third-party-scripts.md) | Other features | Manual | 0 |
| [Portable multi-host deployment](https://framework-compare.vercel.app/features/multi-host-deployment.md) | Other features | Manual | 0 |
| [Service worker / offline support](https://framework-compare.vercel.app/features/service-worker.md) | Other features | Manual | 0 |

## First-paint levers

### Production CSS inlining

Label: **Manual** (0 of 2 points).

Nothing to enable. The [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only; no first-party inlining is documented; `index.html` links `/app/styles/app.css`, and the optimized branch does not change that.

Example of building it yourself:

The port's build step already rewrites the HTML template. Extend it to swap the built stylesheet `<link>` for a `<style>` tag. The Node, Vercel, Netlify and Cloudflare deploys all use that template, so they all get the inlined CSS.

```js
// scripts/prepare-server-template.mjs
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';

const root = process.cwd();
const clientIndex = resolve(root, 'dist/client/index.html');
const serverTemplate = resolve(root, 'dist/server/template.html');

let html = await readFile(clientIndex, 'utf8');
const link = html.match(/<link[^>]+href="(\/assets\/[^"]+\.css)"[^>]*>/);
if (link) {
  const css = await readFile(resolve(root, 'dist/client', link[1].slice(1)), 'utf8');
  html = html.replace(link[0], `<style>${css}</style>`);
}

await mkdir(resolve(root, 'dist/server'), { recursive: true });
await writeFile(serverTemplate, html);
await rm(clientIndex);
```

### Font optimization

Label: **Third-party** (1 of 2 points).

Import the font from [Fontsource](https://fontsource.org) on `optimized`; `main` loads Geist from `fonts.googleapis.com` with `preconnect` and `display=swap`. No first-party font module is documented (the [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only).

```css
@import "@fontsource-variable/geist";
```

*From this repo's `ember-books/app/styles/app.css` (`optimized` branch).*

### Image pipeline

Label: **Third-party** (1 of 2 points).

No first-party image support is documented (the [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only). The community [`@responsive-image/ember`](https://responsive-image.dev/frameworks/ember) addon with `@responsive-image/vite-plugin` covers build-time resizing, `srcset`, and AVIF/WebP for Embroider + Vite apps; this port does not use it and renders a plain `<img>` with no `srcset` or `sizes`.

Example of building it yourself:

Add the `@responsive-image/vite-plugin` to the Embroider Vite config. An import ending in `?responsive` is resized at build time, and the `<ResponsiveImage>` component from `@responsive-image/ember` renders the `srcset`.

```js
// vite.config.mjs
import { defineConfig } from 'vite';
import { extensions, ember } from '@embroider/vite';
import { babel } from '@rollup/plugin-babel';
import { responsiveImage } from '@responsive-image/vite-plugin';

export default defineConfig({
  plugins: [ember(), babel({ babelHelpers: 'runtime', extensions }), responsiveImage()],
});
```

```gjs
// app/components/home/hero.gjs
import { ResponsiveImage } from '@responsive-image/ember';
import heroImage from './hero.jpg?w=640;1280;1920&responsive';

<template>
  <ResponsiveImage @src={{heroImage}} @size={{100}} alt="Shelves of books" />
</template>
```

Source: [responsive-image: Image component](https://responsive-image.dev/usage/component)

Art direction with `<picture>` (Manual, not scored):

The [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only; no first-party support is documented; use a plain `<img>`.

Replace the `<img>` in the port's cover component with a hand-written `<picture>`. Wide screens get Goodreads' large cover, and narrow screens keep the medium one.

```gjs
// app/components/book/book-cover.gjs
import { EMPTY_IMAGE_URL, getLargeBookImageUrl } from '../../lib/book/book-constants';
// …
  get small() {
    return this.args.src ?? EMPTY_IMAGE_URL;
  }

  get large() {
    return getLargeBookImageUrl(this.small);
  }

  <template>
    <picture>
      <source media="(min-width: 768px)" srcset={{this.large}} />
      <img
        alt={{@title}}
        class="absolute inset-0 size-full object-cover"
        decoding="async"
        loading={{this.loading}}
        src={{this.small}}
        {{on "error" this.onError}}
      />
    </picture>
  </template>
```

### Data/HTML caching

Label: **Manual** (0 of 2 points).

On `optimized`, `server/catalog-cache.js` plus `public/_headers` (the header for the static SPA shell that the Netlify and Cloudflare deploys serve); `main` has neither. Where this port server-renders (the Node server and the Vercel function; the Netlify and Cloudflare deploys serve the un-rendered `index.html` shell plus API functions), SSR comes from `vite-ember-ssr`, a community, experimental package (not official; [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) is the official SSR path), which provides no data cache. WarpDrive/EmberData ships a first-party client request cache with expiry policies ([`CachePolicy` / `DefaultCachePolicy`](https://warp-drive.io/guides/configuration/advanced); [repo](https://github.com/warp-drive-data/warp-drive)), but no server, HTML, or edge caching; this port does not use it.

```text
/
  Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate
```

*From this repo's `ember-books/public/_headers` (`optimized` branch; the `/index.html` rule omitted).*

### Route prefetching

Label: **Manual** (0 of 2 points).

Nothing to enable, and no first-party prefetch is documented: the [linking-between-routes guide](https://guides.emberjs.com/release/routing/linking-between-routes/) describes `<LinkTo>` without prefetching; you wire it yourself with a custom modifier or service.

Example of building it yourself:

Write an `ember-modifier` that starts the book request on hover or focus and caches the promise. The route's `model` hook then reads the same cached promise. `<LinkTo>` passes the modifier through to its `<a>`.

```gjs
// app/lib/book/load-catalog.js
const bookCache = new Map();
export function prefetchBook(id, searchParams) {
  const key = `${id}?${stringifySearchParams(searchParams)}`;
  if (!bookCache.has(key)) bookCache.set(key, loadBook(id, searchParams));
  return bookCache.get(key);
}

// app/modifiers/prefetch-book.js
import { modifier } from 'ember-modifier';
import { prefetchBook } from '../lib/book/load-catalog';

export default modifier((element, [id, searchParams]) => {
  const warm = () => prefetchBook(id, searchParams);
  element.addEventListener('pointerenter', warm, { once: true });
  element.addEventListener('focus', warm, { once: true });
  return () => {
    element.removeEventListener('pointerenter', warm);
    element.removeEventListener('focus', warm);
  };
});

// app/routes/book.js: model(params) { return prefetchBook(params.id, parseSearchParams(params)); }
// app/components/book/book-card.gjs
<LinkTo @route="book" @model={{this.bookId}} @query={{this.query}}
        {{prefetchBook this.bookId @searchParams}}>
  {{! … }}
</LinkTo>
```

### Streaming SSR

Label: **Manual** (0 of 2 points).

No streaming render is documented. The [FastBoot user guide](https://ember-fastboot.com/docs/user-guide) and the community [`vite-ember-ssr`](https://github.com/evoactivity/vite-ember-ssr) layer this port uses both render the whole page and then send it.

Example of building it yourself:

Return a `ReadableStream` from the request handler. It sends the top of the HTML template right away, then waits for the Ember render and sends the rest. The status code is fixed at 200 once the first chunk is out.

```js
// server/handle-request.js
import { assembleHTML } from 'vite-ember-ssr/server';

const HEAD_MARKER = '<!-- VITE_EMBER_SSR_HEAD -->';
// … in handleFetch, for page requests
const template = await getTemplate();
const early = template.slice(0, template.indexOf(HEAD_MARKER));
const encoder = new TextEncoder();

const body = new ReadableStream({
  async start(controller) {
    controller.enqueue(encoder.encode(early)); // charset, viewport, favicon
    const emberApp = await getEmberApp();
    const rendered = await emberApp.renderRoute(`${url.pathname}${url.search}`, { settledTimeout: 8000 });
    controller.enqueue(encoder.encode(assembleHTML(template, rendered).slice(early.length)));
    controller.close();
  },
});
return new Response(body, { headers: { 'content-type': 'text/html; charset=utf-8' } });
```

Source: [vite-ember-ssr](https://github.com/evoactivity/vite-ember-ssr) · [MDN: ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)

### Early Hints / preload headers

Label: **Manual** (0 of 2 points).

No first-party preload headers or Early Hints are documented in the [FastBoot user guide](https://ember-fastboot.com/docs/user-guide) or in [`vite-ember-ssr`](https://github.com/evoactivity/vite-ember-ssr). Set a `Link` header in the Node server that wraps the renderer, or at the host.

Example of building it yourself:

Set a `Link` header on the Fastify reply that sends the rendered page. This one preconnects to the font host. To preload a built file with a hashed name, read its URL from the Vite manifest.

```js
// server.js
const LINK = '<https://fonts.gstatic.com>; rel=preconnect; crossorigin';
// … in the handler that sends the SSR result
const { html } = await renderHtml(emberApp, request.url, template);
return reply.header('Link', LINK).type('text/html').send(html);
```

Source: [Fastify Reply: `.header()`](https://fastify.dev/docs/latest/Reference/Reply/#headerkey-value)

## Other features

### Islands / partial hydration / lazy slices

Label: **Manual** (0 of 2 points).

Nothing to enable: no first-party partial hydration is documented; SSR is app-wide (community `vite-ember-ssr` here; official [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot)).

Example of building it yourself:

Serve the page with a small entry instead of `app/entry.js`. Then mount each interactive component into its placeholder with `renderComponent` from `@ember/renderer`. The rest of the page stays static HTML.

```gjs
// app/islands.js (the only <script type="module"> on a static page)
import { renderComponent } from '@ember/renderer';
import FavoriteButton from './components/islands/favorite-button';

const islands = { 'favorite-button': FavoriteButton };

for (const el of document.querySelectorAll('[data-island]')) {
  const args = JSON.parse(el.dataset.args ?? '{}');
  el.replaceChildren(); // no hydration: drop the server markup, then render fresh
  renderComponent(islands[el.dataset.island], { into: el, args });
}

// app/components/islands/favorite-button.gjs
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { on } from '@ember/modifier';

export default class FavoriteButton extends Component {
  @tracked saved = false;
  toggle = () => (this.saved = !this.saved);
  <template>
    <button type="button" {{on "click" this.toggle}}>
      {{if this.saved "Saved" "Save"}} {{@title}}
    </button>
  </template>
}
```

Source: [RFC 1099: renderComponent](https://github.com/emberjs/rfcs/blob/main/text/1099-renderComponent.md)

### Per-route render modes

Label: **Manual** (0 of 2 points).

SSR is app-wide in this port (`emberSsr()` from community `vite-ember-ssr`; official [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) is also app-wide). `vite-ember-ssr` can additionally prerender a listed set of routes at build time (`emberSsg({ routes })`), a community build step (React Router's equivalent first-party `prerender` list is what earns its ✅); no first-party per-route render mode is documented, so nothing to enable.

Example of building it yourself:

Choose the mode per path in the port's request handler. Server-render the routes that need it. For the rest, return the unrendered template: the same SPA shell the port's Netlify and Cloudflare deploys serve.

```js
// server/handle-request.js
const CLIENT_ONLY = [/^\/account(\/|$)/]; // example: routes that skip SSR

export async function handleFetch(request, options = {}) {
  const url = new URL(request.url);
  // … /api/* handlers from the port …

  const template = await getTemplate();
  if (CLIENT_ONLY.some((re) => re.test(url.pathname))) {
    // SPA shell: app/entry.js boots the app in the browser
    return new Response(template, {
      headers: { 'content-type': 'text/html; charset=utf-8' },
    });
  }

  const emberApp = await getEmberApp();
  const rendered = await emberApp.renderRoute(`${url.pathname}${url.search}`, {
    settledTimeout: 8000,
  });
  return new Response(assembleHTML(template, rendered), {
    headers: { 'content-type': 'text/html; charset=utf-8' },
    status: rendered.statusCode,
  });
}
```

### Fine-grained client reactivity

Label: **1st-party** (2 of 2 points).

`@tracked` [autotracking](https://guides.emberjs.com/release/in-depth-topics/autotracking-in-depth/).

```js
export default class SidebarService extends Service {
  @tracked isOpen = false;
}
```

*From this repo's `ember-books/app/services/sidebar.js` (`optimized` branch; methods omitted).*

### Built-in bundle analysis

Label: **Third-party** (1 of 2 points).

Embroider's [Analyzing Bundles](https://github.com/embroider-build/embroider/blob/main/docs/analyzing.md) page says no Ember-specific analysis tooling is provided and points to Vite's performance guide and the community `vite-bundle-visualizer` (a CLI over [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer)); not configured here. [ember-cli-bundle-analyzer](https://github.com/simonihmig/ember-cli-bundle-analyzer) covers classic and webpack builds.

Example of building it yourself:

Embroider points to the community `vite-bundle-visualizer`, a CLI wrapper around `rollup-plugin-visualizer`. It builds with the app's Vite config and writes a treemap.

```sh
# in the app root; Ember's config file is vite.config.mjs
npx vite-bundle-visualizer -c vite.config.mjs -o stats.html
```

Source: [Embroider: Analyzing Bundles](https://github.com/embroider-build/embroider/blob/main/docs/analyzing.md)

### Third-party script strategies

Label: **Manual** (0 of 2 points).

The [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only and no first-party script primitive is documented; use a script tag in `index.html` or an addon.

Example of building it yourself:

There is no script component, so put the loading strategy in `index.html`. This one waits for the `load` event and an idle moment before it injects the tag, like Next's `lazyOnload`.

```html
<!-- index.html -->
<head>
  <!-- … -->
  <script>
    addEventListener('load', function () {
      (window.requestIdleCallback || setTimeout)(function () {
        var s = document.createElement('script');
        s.src = 'https://example-analytics.com/script.js';
        s.async = true;
        document.head.appendChild(s);
      });
    });
  </script>
</head>
```

### Portable multi-host deployment

Label: **Manual** (0 of 2 points).

Embroider/Vite ([guide](https://guides.emberjs.com/release/build-tools/vite)) plus a community SSR layer (`vite-ember-ssr` here; in this port only the Node server and the Vercel function server-render, while the Netlify and Cloudflare deploys serve a static SPA shell plus API functions). Official [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) 6.0.0 documents Ember CLI builds only; Vite-app support is an open draft PR. No first-party host adapters are documented (FastBoot's deploy page covers a Node app server plus Heroku- and community-maintained AWS integrations, not Vercel, Netlify, or Cloudflare), so nothing to enable.

Example of building it yourself:

From the port: each host gets its own entry file and config, written by hand. Vercel runs the SSR handler as a function (`vercel.json` rewrites everything to `/api`). Cloudflare runs a Worker that serves the API and the static SPA shell. Netlify uses `netlify.toml` redirects plus `netlify/functions/api.mjs`.

```js
// api/index.js (Vercel: SSR + API)
import '../server/load-env.js';
import { handleNodeRequest } from '../server/handle-request.js';
export default handleNodeRequest;

// workers/index.mjs (Cloudflare: API only, assets from dist/client)
import { bookPayload, catalogPayload, searchParamsFromUrl } from '../server/catalog-api.js';

export default {
  async fetch(request, env) {
    if (env?.POSTGRES_URL) process.env.POSTGRES_URL = env.POSTGRES_URL;
    const url = new URL(request.url);
    if (url.pathname === '/api/catalog') {
      return Response.json(await catalogPayload(searchParamsFromUrl(url.href)));
    }
    // … /api/books/:id …
    return env.ASSETS.fetch(request); // SPA shell (not_found_handling: single-page-application)
  },
};
```

### Service worker / offline support

Label: **Manual** (0 of 2 points).

No first-party service worker is documented in the [Ember guides](https://guides.emberjs.com/release/). The community [`ember-service-worker`](https://github.com/DockYard/ember-service-worker) addon was last published in 2020 (9.0.1) and plugs into the classic Ember CLI build, which this Vite port does not use.

Example of building it yourself:

Put a hand-written worker in `public/` and register it with an inline script in `index.html`.

```js
// public/sw.js
const CACHE = 'books-v1'; // change the name on each deploy

self.addEventListener('activate', (event) => {
  event.waitUntil(
    caches.keys().then((keys) => Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))),
  );
});

self.addEventListener('fetch', (event) => {
  const { request } = event;
  if (request.method !== 'GET' || new URL(request.url).origin !== location.origin) return;
  // Network first, so pages stay current. The cached copy answers when offline.
  event.respondWith(
    fetch(request)
      .then((response) => {
        const copy = response.clone();
        caches.open(CACHE).then((cache) => cache.put(request, copy));
        return response;
      })
      .catch(() => caches.match(request)),
  );
});
```

```html
<!-- index.html, before </head> -->
<script>
  if ('serviceWorker' in navigator) {
    addEventListener('load', () => navigator.serviceWorker.register('/sw.js'));
  }
</script>
```

Source: [Using Service Workers (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers)

## Deployments of the Books demo

| Branch | Note | Vercel | Netlify | Cloudflare |
| --- | --- | --- | --- | --- |
| `main` | vibe port | https://ember-books.vercel.app | https://ember-books.netlify.app | https://ember-books.to-email-max.workers.dev |
| `optimized` | cache + fonts | https://ember-books-optimized.vercel.app | https://ember-books-max-optimized.netlify.app | https://ember-books-optimized.to-email-max.workers.dev |

## Benchmark, 2026-11-28

Tool: PageSpeed Insights v5 (Lighthouse lab run), mobile strategy. 3 measured runs per deployment, median reported; cold runs are left out of the median when a warm run exists. Each build's figure is the average of its hosts' medians (vercel, netlify, cloudflare). Pages measured: book list (/) and one book (/10145787). Times are lab values from one run on 2026-11-28. FCP is the Lighthouse estimate for simulated Slow 4G; Raw FCP, where shown, is the first paint in the real, unthrottled load that estimate is built from. Builds in the same FCP band (https://framework-compare.vercel.app/measured.md) are a tie, so read "fastest first" as band order.

| Page | Build | Branch | Hosts | Performance | FCP | Raw FCP | LCP | TBT | CLS |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| book list (/) | baseline | `main` | cloudflare, netlify, vercel | 85 | 1.51 s | 0.94 s | 4.21 s | 106 ms | 0.001 |
| book list (/) | optimized | `optimized` | cloudflare, netlify, vercel | 90 | 1.08 s | 0.85 s | 3.56 s | 78 ms | 0.000 |
| one book (/10145787) | baseline | `main` | cloudflare, netlify, vercel | 96 | 1.52 s | 0.47 s | 2.63 s | 28 ms | 0.000 |
| one book (/10145787) | optimized | `optimized` | cloudflare, netlify, vercel | 99 | 0.78 s | 0.51 s | 2.07 s | 21 ms | 0.000 |

Full run: https://framework-compare.vercel.app/benchmark.md

---

HTML version: https://framework-compare.vercel.app/frameworks/ember · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
