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
Microarchitecture using Angular 4 as an example
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
GDG Cherkasy
May 29, 2017
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Microarchitecture using Angular 4 as an example
Kirill Gusyatin, JS developer at eKreative
GDG Cherkasy
May 29, 2017
More Decks by GDG Cherkasy
See All by GDG Cherkasy
Трансформація від розробника до ліда: байки та поради.
gdgcherkasy
0
150
Емоції: усвідомлення, прийняття, комунікація
gdgcherkasy
0
150
Kibana Plugin Development - Vlad Bolibruk
gdgcherkasy
0
93
“Why JS is way to go for backend”
gdgcherkasy
0
96
CoreData, custom merge policy
gdgcherkasy
2
1.6k
macOS_for_iOS_devs2.pdf
gdgcherkasy
0
87
MQTT.pdf
gdgcherkasy
1
59
Инструменты Lean Product Management как точки пересечения проектов с "реальностью": хватит клонировать плохие решения!
gdgcherkasy
1
93
Насколько силен Иммунитет вашей организации?
gdgcherkasy
1
120
Other Decks in Programming
See All in Programming
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.6k
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
360
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
780
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
190
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
230
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
470
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
120
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
260
Flow は今どうなっているか
mizdra
PRO
0
260
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
110
FDEが実現するAI駆動経営の現在地
gonta
2
280
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
480
Raft: Consensus for Rubyists
vanstee
141
7.6k
KATA
mclloyd
PRO
35
15k
Mind Mapping
helmedeiros
PRO
1
310
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
640
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Designing Experiences People Love
moore
143
24k
Done Done
chrislema
186
16k
Making the Leap to Tech Lead
cromwellryan
135
10k
Designing for humans not robots
tammielis
254
26k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
410
How to Talk to Developers About Accessibility
jct
2
510
Transcript
Microarchitecture using Angular 4 as an example
Hello! I am Kirill Gusyatin You can find me at
[email protected]
Based on Pascal Precht’s thoughts
Microarchitecture Where does this start?
None
MICROARCHITECTURE MICROARCHITECTURE EVERYWHERE
Why?
“ Microarchitecture is an architecture of microelement
Angular framework Let’s have an example with 4200 d’n’d boxes
app.component.html
App.component.ts (1/2)
App.component.ts (2/2)
box.component.ts
box.component.html
Measure performance
None
Initial results Max Min 1 28ms 19ms 2 30ms 21ms
3 25ms 17ms
Let’s do it faster
Our process is easy ChangeDetectionStrategy.OnPush Detach change detectors “Simple” NgFor
ChangeDetectionStrategy.OnPush Use Angular’s OnPush change detection strategy to save view
bindings per change detection task
None
box.component.ts
app.component.ts
ChangeDetectionStrategy.OnPush Max Min 1 15ms 13ms 2 18ms 13ms 3
16ms 14ms
“Simple” NgFor Angular’s NgFor directive is sometimes a little bit
too smart. A simpler version of it could be faster
app.component.html
“Simple” NgFor Max Min 1 16ms 11ms 2 15ms 9ms
3 18ms 10ms
Detach change detectors Another option is to detach all change
detectors from the tree and only perform change detection for the components that is actually changing
app.component.ts
box.component.ts
box.component.ts
app.component.ts
box.component.ts
Detach change detectors Max Min 1 0.52ms 0.059ms 2 0.83ms
0.064ms 3 0.47ms 0.040ms
General (medians) Max Min Initial code 28ms 19ms ChangeDetectionStrategy.OnPush 16ms
13ms “Simple” NgFor 16ms 10ms Detach change detectors 0.606ms 0.054ms
Thanks! Any questions? You can find me at
[email protected]
&
github.com/kikill95
Worth to read ◍ https://goo.gl/MMW0Pe ◍ https://goo.gl/Gz0PqC