Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lazy Loading en Just Angular : Aïe ?
Search
igor
June 27, 2017
Programming
110
0
Share
Lazy Loading en Just Angular : Aïe ?
igor
June 27, 2017
More Decks by igor
See All by igor
Java REST client with Feign
ilaborie
0
57
3h pour développer un microservice avec SparkJava et Feign
ilaborie
1
510
Feign Live
ilaborie
0
160
Other Decks in Programming
See All in Programming
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.5k
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
270
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
AI-DLC Deep Dive
yuukiyo
9
5.8k
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.6k
要はバランスからの卒業 #yumemi_grow
kajitack
0
160
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.3k
20260514_its_the_context_window_stupid.pdf
heita
0
980
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
350
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Mind Mapping
helmedeiros
PRO
1
190
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Embracing the Ebb and Flow
colly
88
5k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
The agentic SEO stack - context over prompts
schlessera
0
780
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
230
Transcript
Lazy Loading en Just Angular : Aïe ? 27 Juin
2017
$ whoami Igor Laborie Expert Java & Web @ @ilaborie
✉
[email protected]
Roadmap 1. Être Lazy en TypeScript 2. Activer le lazy-loading
3. Stratégies de chargement 4. Dépendances paresseuses Photo de Natalie Fox on Unsplash
Être lazy en TypeScript Paresseux à gorge brune (Bradypus variegatus)
Lac Gatun, République de Panama Attribution: Tauchgurke [Public domain], via Wikimedia Commons
Live Coding Photo de Claudiu Lupu de Unsplash
Bilan sur le Lazy-Loading • gagner du temps • gagner
de la mémoire • permet le traitement sur des flux ∞ • un peu moins lisible • le Supplier doit être sans effets de bord
Activer le lazy-loading Paresseux à 2 doigts (Choloepus didactylus) Zoo
de Buffalo, New York By Dave Pape (Own work) [Public domain], via Wikimedia Commons
Live Coding Photo de Claudiu Lupu de Unsplash
Mesures * aucun animal n'a été maltraité durant les builds
0 & 1: module B (material) 2: module C (d3js) 3: module A
Plutôt facile • lié aux modules et aux routes =>
maîtriser les modules, le routing => bien modéliser les dépendances du projet • ⚠ Ne pas oublier d'enlever les imports des modules lazy
Avant
Après
0/ Mesurez ! • On peut se baser sur la
taille des bundles et des chuncks • ou utiliser les outils de développement de votre navigateur, s'il peut simuler des connections plus lente (throttling)
1/ Supprimez les dépendances
2/ ajoutez les routes avec loadChildren
3/ mettez à jour les routes des modules
Stratégies de chargement Paresseux à gorge brune (Bradypus variegatus) Cahuita
National Park, Costa Rica By Christian Mehlführer, User:Chmehl (Own work) [CC BY 2.5], via Wikimedia Commons
Live Coding Photo de Claudiu Lupu de Unsplash
Trop facile • On peut facilement choisir comment on charge
les modules • ⚠ La classe PreloadingStrategy est marquée 'Experimental'
1/ Ajoutez un preloadingStrategy
2/ Custom preloader
Dépendances paresseuses Paresseux à 2 doigts (Choloepus didactylus) Zoo New
England, Boston By Eric Kilby from Somerville, MA, USA (Mom Sloth Carrying Big Baby) [CC BY-SA 2.0], via Wikimedia Commons
Live Coding Photo de Claudiu Lupu de Unsplash
Ouch ! • ⚠ Problème avec les singletons injectés =>
CoreModule => ou exposer de 2 façon le module (forRoot avec les providers pour les singletons) • Mais on arrive quand même à faire ce qu'on veut
forRoot
Conclusion • Réduction du 'Web App Gap': optimisation assets,
AOT, lazy-loading, server-side rendering, ... • Bien concevoir ses modules et routes ⚠ bien connaître son application
By Masteraah [CC BY-SA 2.0], via Wikimedia Commons Q /
A