Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Speed Up Your Angular Apps with Ivy
Search
Chris Sevilleja
November 20, 2019
Programming
30
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Speed Up Your Angular Apps with Ivy
Chris Sevilleja
November 20, 2019
Other Decks in Programming
See All in Programming
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
1
300
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
610
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Railsバージョンを4倍にした話
optim
0
400
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Making the Leap to Tech Lead
cromwellryan
135
10k
Side Projects
sachag
456
43k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
4 Signs Your Business is Dying
shpigford
187
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Docker and Python
trallard
47
4.2k
エンジニアに許された特別な時間の終わり
watany
109
250k
Agile that works and the tools we love
rasmusluckow
331
22k
Transcript
@sonicparke @chrisoncode IVY SPEED UP YOUR APPS
@sonicparke @chrisoncode BRAD MCALISTER CHRIS ON CODE @chrisoncode @sonicparke
@sonicparke @chrisoncode SHOW OF HANDS
@sonicparke @chrisoncode ANGULAR V8
@sonicparke @chrisoncode VERSION 4?
@sonicparke @chrisoncode WHAT ABOUT 3?
@sonicparke @chrisoncode GOTCHA!
@sonicparke @chrisoncode ANGULARJS FOREVER
@sonicparke @chrisoncode IVY TIME
@sonicparke @chrisoncode IVY TIME
@sonicparke @chrisoncode SMALLER SIMPLER FASTER
@sonicparke @chrisoncode WHY?
@sonicparke @chrisoncode 65% US MOBILE TRAFFIC
@sonicparke @chrisoncode 53% PEOPLE THAT LEAVE AFTER 3S
@sonicparke @chrisoncode -1.6B IF AMAZON.COM IS 1 SECOND SLOWER...
@sonicparke @chrisoncode Angular 2,024 kb
@sonicparke @chrisoncode Angular 1,352 kb + Differential Loading
@sonicparke @chrisoncode Angular 955 kb + Differential Loading + Ivy
@sonicparke @chrisoncode Angular 912 kb + Differential Loading + Ivy
+ No Zones
@sonicparke @chrisoncode 48.1 MAIN.JS
@sonicparke @chrisoncode 13.1 MAIN.JS
@sonicparke @chrisoncode HOW DO I TURN IT ON?
@sonicparke @chrisoncode ng new shiny*ivy*app ./enable*ivy
@sonicparke @chrisoncode { "compilerOptions": { ..; }, "angularCompilerOptions": { "enableIvy":
true } }
@sonicparke @chrisoncode { "projects": { "my*existing*project": { "architect": { "build":
{ "options": { ..; "aot": true, } } } } } }
@sonicparke @chrisoncode { ..; "aot": true }
@sonicparke @chrisoncode WHAT DO WE GET?
@sonicparke @chrisoncode DEV IS FASTER
@sonicparke @chrisoncode ERRORS ARE BETTER
@sonicparke @chrisoncode <img [src]=“getImageUrl()">
@sonicparke @chrisoncode <img [src]="getImageUr()">
@sonicparke @chrisoncode Compiled successfully.
@sonicparke @chrisoncode AppComponent.ngfactory.js? [sm]Q1 ERROR TypeError: _co.getImageUr is not a
function at Object.eval [as updateRenderer] (AppComponent.html:1)
@sonicparke @chrisoncode (AppComponent.html:1)
@sonicparke @chrisoncode What about Ivy?
@sonicparke @chrisoncode ERROR in src/app/user/user.component.html(2,13)Q Property 'getImageUr' does not exist
on type 'UserComponent'. Did you mean 'getImageUrl'?
@sonicparke @chrisoncode user.component.html(2,13)
@sonicparke @chrisoncode Did you mean 'getImageUrl'?
@sonicparke @chrisoncode NO LAZY
@sonicparke @chrisoncode @NgModule({ declarations: [AppComponent], imports: [BrowserModule, MyCustomModule], providers: [],
bootstrap: [AppComponent] }) export class AppModule {}
@sonicparke @chrisoncode @NgModule({ declarations: [AppComponent], imports: [BrowserModule, MyCustomModule], providers: [],
bootstrap: [AppComponent] }) export class AppModule {}
@sonicparke @chrisoncode DEMO!
@sonicparke @chrisoncode YES LAZY
@sonicparke @chrisoncode import { Component } from '@angular/core'; @Component({ selector:
'app*root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { }
@sonicparke @chrisoncode export class AppComponent { }
@sonicparke @chrisoncode export class AppComponent { constructor(private injector: Injector) {}
}
@sonicparke @chrisoncode export class AppComponent { constructor(private injector: Injector) {}
public loadLogin() { import('./login*form/login*form.component') } }
@sonicparke @chrisoncode export class AppComponent { constructor(private injector: Injector) {}
public loadLogin() { import('./login*form/login*form.component').then(c .d { ɵrenderComponent(c.LoginFormComponent, { host: 'app*login*form', injector: this.injector }); }); } }
@sonicparke @chrisoncode ?ɵ?
@sonicparke @chrisoncode <app*login*form>.fapp*login*form>
@sonicparke @chrisoncode <button (click)="loadLogin()"> Show Login Form .fbutton>
@sonicparke @chrisoncode DEMO!
@sonicparke @chrisoncode LAZY + MODULE
@sonicparke @chrisoncode @NgModule({ declarations: [LoginFormComponent], imports: [ CommonModule, MatButtonModule, MatInputModule,
MatCardModule, FormsModule, ReactiveFormsModule ], exports: [LoginFormComponent] })
@sonicparke @chrisoncode @NgModule({ declarations: [LoginFormComponent], imports: [ CommonModule, MatButtonModule, MatInputModule,
MatCardModule, FormsModule, ReactiveFormsModule ], exports: [LoginFormComponent] })
@sonicparke @chrisoncode export class LoginFormModule { constructor(private resolver: ComponentFactoryResolver) {}
}
@sonicparke @chrisoncode export class LoginFormModule { constructor(private resolver: ComponentFactoryResolver) {}
public resolveComponentFactory()Q ComponentFactory<LoginFormComponent> { return this.resolver.resolveComponentFactory(LoginFormComponent); } }
@sonicparke @chrisoncode export class AppComponent { @ViewChild('loginForm', { read: ViewContainerRef,
static: true }) public loginForm: ViewContainerRef; constructor(private injector: Injector) {} public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector = ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); } }
@sonicparke @chrisoncode export class AppComponent { @ViewChild('loginForm', { read: ViewContainerRef,
static: true }) public loginForm: ViewContainerRef; constructor(private injector: Injector) {} }
@sonicparke @chrisoncode <ng*container #loginForm>.fng*container>
@sonicparke @chrisoncode export class AppComponent { @ViewChild('loginForm', { read: ViewContainerRef,
static: true }) public loginForm: ViewContainerRef; constructor(private injector: Injector) {} public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector = ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); } }
@sonicparke @chrisoncode public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector
= ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); }
@sonicparke @chrisoncode public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector
= ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); }
@sonicparke @chrisoncode public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector
= ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); }
@sonicparke @chrisoncode public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector
= ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); }
@sonicparke @chrisoncode public loadLogin() { import('./login*form*material/login*form.module').then(m .d { const injector
= ɵcreateInjector(m.LoginFormModule, this.injector); const loginFormModule = injector.get(m.LoginFormModule); const componentFactory = loginFormModule.resolveComponentFactory(); const componentRef = this.loginForm.createComponent(componentFactory); componentRef.changeDetectorRef.markForCheck(); }); }
@sonicparke @chrisoncode DEMO!
@sonicparke @chrisoncode NO ZONES
@sonicparke @chrisoncode .k * Zone JS is required by default
for Angular itself. .p import 'zone.js/dist/zone';
@sonicparke @chrisoncode .k * Zone JS is required by default
for Angular itself. .p .r import 'zone.js/dist/zone';
@sonicparke @chrisoncode platformBrowserDynamic() .bootstrapModule(AppModule)
@sonicparke @chrisoncode platformBrowserDynamic() .bootstrapModule(AppModule, { ngZone: 'noop' })
@sonicparke @chrisoncode export class CounterComponent implements OnInit { }
@sonicparke @chrisoncode export class CounterComponent implements OnInit { data =
interval(1000); number: number; }
@sonicparke @chrisoncode export class CounterComponent implements OnInit { data =
interval(1000); number: number; ngOnInit() { this.data .pipe(tap(() .d ɵmarkDirty(this))) .subscribe(num .d (this.number = num)); } }
@sonicparke @chrisoncode export class CounterComponent implements OnInit { data =
interval(1000); number: number; ngOnInit() { this.data .pipe(tap(() .d ɵmarkDirty(this))) .subscribe(num .d (this.number = num)); } }
@sonicparke @chrisoncode export class CounterComponent implements OnInit { data =
interval(1000); number: number; ngOnInit() { this.data .pipe(tap(() .d ɵmarkDirty(this))) .subscribe(num .d (this.number = num)); } }
@sonicparke @chrisoncode DEMO!
@sonicparke @chrisoncode THE FUTURE IVY ENABLES
@sonicparke @chrisoncode K THX BAI
@sonicparke @chrisoncode BRAD MCALISTER CHRIS ON CODE @chrisoncode @sonicparke