Skip to content

Instantly share code, notes, and snippets.

View kratiahuja's full-sized avatar

Krati Ahuja kratiahuja

  • Linkedin
View GitHub Profile

Things to do in war room:

  • Release simple-dom to v1.0? 🎉
  • Update simple-dom to v1.0.0 in fastboot
  • Release fastboot v1.0.0 🎉
  • Update fastboot version to v1.0.0 in fastboot-express-middleware
  • Release fastboot-express-middleware v1.0.0 🎉
  • Update fastboot version to v1.0.0 in fastboot-app-server
  • Update fastboot-express-middleware to v1.0.0 in fastboot-app-server
  • Release fastboot-app-server v1.0.0 🎉

FastBoot 1.0 is close to being shipped. The rc builds have been relatively stable with no major issues.

ember-cli-fastboot

We released v1.0.0-rc.4 today which contains a fix for fingerprinted assets to be loaded in Node. Also nested addons and in-repo that are FastBoot complaint now work correctly with ember-cli-fastboot (Thanks to @rwjblue).

Links:

  1. Loading fingerprinting assets: ember-fastboot/ember-cli-fastboot#431
  2. Allow in-repo addons to have fastboot trees: ember-fastboot/ember-cli-fastboot#422
  3. Ensure treeForFastBoot is called for nested addons: ember-fastboot/ember-cli-fastboot#423
@kratiahuja
kratiahuja / fastboot-migration.md
Last active May 10, 2018 14:49
FastBoot 1.0 migration cheatsheet

Pre-req

The below guide only applies to addons. If your app is using process.env.EMBER_CLI_FASTBOOT, please create an in-repo addon and follow this guide.

Testing guidelines

When you make the changes to make sure your addons are backward compatible for upcoming FastBoot build changes, make sure to test all the usecases as follows:

  1. An app running the current FastBoot double builds. Your app should boot and function correctly in browser and FastBoot.
  2. An app running with the proposed FastBoot build changes here. Your app should boot and function correctly in browser and FastBoot.
  3. An app having ember-cli-fastboot not installed. Make sure the fastboot initializers or vendor files are not running in browser.

Use cases

@kratiahuja
kratiahuja / fastboot-build.md
Last active May 22, 2017 00:14
Fastboot build meeting notes

FastBoot Build meeting notes

Date

02/06/17

Attendees

  • Tom Dale
  • Robert Jackson
  • Stefan Penner
  • Ryan Cruz
@kratiahuja
kratiahuja / Running_Fastboot_App.md
Last active November 12, 2016 00:56
How to run an Fastboot addon with faster fastboot builds

Background

Fastboot 1.0 release is blocked on bad build performance and serving fastboot assets inconsistently. We want to fix this by changing the way fastboot builds its assets. Instead of creating seperate assets we want to create additive assets. This issue in ember-cli perfectly defines what we want to do.

This gist describes the work on how to unblock Fastboot 1.0 and how to run those PRs so that you can play with it.

Things to be done in ember-cli

WIP PRs/RFCs for Fastboot 1.0 release

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@kratiahuja
kratiahuja / pre-boot-ember-app.md
Last active January 29, 2018 18:46
This file describes how to pre boot an Ember application without waiting for DOM ready.

Ember Boot Phase

When an Ember app boots up, it primarily waits for the DOM to be ready before it can boot your application. Though this is a safe check needed in order to have your custom event handlers attach correctly to the DOM, it may not be always necessary. In Ember all event handling is attached to the rootElement by default.

Waiting for the DOM ready may not be always necessary and would be a disadvantage in certain scenarios. For example, the app's index.html could also contain the API data needed by that route in a pre-fetched fashion. The index.html could be served in chunks (ie as the data is available we would be sending it to the client). When the client app boots in the browser, it can use this pre-fetched data to serve the route. When serving the base page in chunks (using Transfer-Encoding protocol), the browser fires the DOM ready only after the last chunk is sent down. This could cause the DOM ready to be delayed and the Ember app cannot do anything until then.

Parallelize boot

@kratiahuja
kratiahuja / ember-boot-hooks.md
Created July 7, 2015 23:36
This file describes the various performance hooks we need during an ember application boot up phase

#Ember boot up hooks This document describes the high level use cases and various user hooks that are needed during the ember boot up phase.

Use cases

We want to measure the time an ember application takes to boot up before it can serve any requests. There are various stages in the boot up phase (creating the application instance, running the initializers etc). We want to capture the time it took during the boot up to recongize any potential performance issues. For this, we need public hooks to add timing measure ments. Following are the time measurement use cases that we would like to capture:

  • Amount of time the application took to boot: The boot phase starts after jquery 'ready' event is fired. We need a hook that indicates this event is fired.
  • Amount of time the application is in 'deferred' state: Ember allows to delay the boot phase and perform any operations before boot by putting the app in defered state. We need general hooks to indicate the start and end of the defered state
  • Amount of t