Skip to content

Improved Ember dev server startup#27702

Merged
jonatansberg merged 2 commits intomainfrom
speed-up-ember-dev-server
May 7, 2026
Merged

Improved Ember dev server startup#27702
jonatansberg merged 2 commits intomainfrom
speed-up-ember-dev-server

Conversation

@jonatansberg
Copy link
Copy Markdown
Member

Summary

  • Skip Ember test and hinting trees during normal development builds.
  • Exclude Mirage files from normal development builds unless explicitly opted in.
  • Keep /tests support available with EMBER_INCLUDE_TESTS=true.

Why

ember serve was building test and Mirage assets by default in development, pulling large dev-only dependencies such as Faker into the default startup path. This keeps the normal dev server focused on the app graph while preserving explicit test-server support.

Validation

  • Ran isolated ember serve --port 4210 --live-reload false profiling before and after the change.
  • Before: ~31.4s Ember build, 777 Broccoli steps, ~2.85 GB max RSS, 16.6 MiB Faker/Mirage webpack chunk.
  • After: server reached Build successful, ~19.8s profiled Ember build, 716 Broccoli steps, ~1.68 GB max RSS.
  • Commit hooks ran eslint and secret scanning successfully.

Normal Ember dev server runs were building test and Mirage assets, which pulled large dev-only dependencies into the hot path. Keeping those assets behind an explicit opt-in reduces the default startup workload while preserving test builds.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc220bd0-91db-4d87-81fe-6499f54a1fd4

📥 Commits

Reviewing files that changed from the base of the PR and between 333ba93 and 8ad8e7b.

📒 Files selected for processing (1)
  • ghost/admin/ember-cli-build.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • ghost/admin/ember-cli-build.js

Walkthrough

The pull request introduces centralized control for test asset inclusion in the build process. Two files are modified: config/environment.js now adds an excludeFilesFromBuild property to ember-cli-mirage configuration based on the EMBER_INCLUDE_TESTS environment variable. ember-cli-build.js introduces an includeTestAssets constant that conditionally enables test asset loading based on environment and EMBER_INCLUDE_TESTS. This flag controls inclusion of test-related assets (including Codemirror vendor assets) and dynamic test imports, applying conditions to the EmberApp configuration for tests, hinting, and trees settings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improved Ember dev server startup' accurately reflects the main objective of the changeset—optimizing the Ember development server's startup performance.
Description check ✅ Passed The description clearly explains the changes (skipping test/hinting trees, excluding Mirage files) and provides validation metrics demonstrating the performance improvements achieved.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch speed-up-ember-dev-server

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jonatansberg jonatansberg requested a review from kevinansfield May 6, 2026 11:25
@jonatansberg jonatansberg marked this pull request as ready for review May 6, 2026 11:25
Comment thread ghost/admin/ember-cli-build.js Outdated
- uses app.env for post-constructor test asset imports so they follow the generated build type instead of only the process environment
@jonatansberg jonatansberg merged commit 0332bfa into main May 7, 2026
41 checks passed
@jonatansberg jonatansberg deleted the speed-up-ember-dev-server branch May 7, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants