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
Measuring Performance of AngularJS applications
Search
Kenneth Auchenberg
December 11, 2015
Programming
660
1
Share
Measuring Performance of AngularJS applications
Opbeat for AngularJS
Kenneth Auchenberg
December 11, 2015
More Decks by Kenneth Auchenberg
See All by Kenneth Auchenberg
BUILD 2017: Supercharge your JavaScript debugging workflow with VS Code 🔥
auchenberg
0
380
A future without browsers, February 2017
auchenberg
11
2.8k
DevTools of The Future, JSCONF Asia 2016, Singapore
auchenberg
3
310
Future of DevTools, Full Stack Tech 2016, Argentina
auchenberg
0
210
JSCONF Columbia 2016: DevTools for the Progressive Web
auchenberg
1
380
JSCONF China 2016: DevTools for the Progressive Web
auchenberg
2
510
Edge DevTools Summer 2016
auchenberg
0
200
Web Rebels 16: DevTools for the Progressive Web
auchenberg
1
270
AtTheFrontend 16: DevTools for the Progressive Web
auchenberg
1
350
Other Decks in Programming
See All in Programming
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
110
Are We Really Coding 10× Faster with AI?
kohzas
0
220
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
270
Agentic AI in the Frontend: Architectures with Open Standards @iJS London 2026
manfredsteyer
PRO
0
100
今さら聞けないCancellationToken
htkym
0
180
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
1.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
260
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
1
470
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2.4k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
0
250
CSC307 Lecture 17
javiergs
PRO
0
230
関係性から理解する"同一性"の型用語たち
pvcresin
2
510
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
270
Leo the Paperboy
mayatellez
7
1.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Ace a Technical Interview
jacobian
281
24k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Transcript
Measuring Performance of AngularJS apps San Francisco, December 2015 Kenneth
@auchenberg
Soo, performance?
Page load
Steve Souders
None
YSlow
PageSpeed
We build API’s to help us
Navigation Timing API https://blogs.windows.com/buildingapps/2011/08/02/measuring-mobile-site-performance-using-the-w3c-navigation-timing-api/
Resource Timing API http://www.stevesouders.com/blog/2014/11/25/serious-confusion-with-resource-timing/
Server Initial payload Browser Server-side web apps
The web has changed
Application runtime
None
Server/CDN Initial payload Browser Client-side web apps API App Page
load App boot
Client-side frameworks
Application performance Browser
Application performance
Chrome DevTools: Timeline
Chrome DevTools: CPU Profiler
Where is “my app” timeline?
None
for AngularJS
Framework specific
Trace levels App framework Browser primitives App Template Caching Storage
HTTP XHR/WebSocket MutationObservers LocalStorage Reflow Paint Rasterize Compose viewport engine
Error logging + Performance
Installation
Error logging window.onError + “magic”
Error logging 1. Error parsing 2. Stack frame generation 3.
Stack frame normalization
Code instrumentation Performance
None
Challenges
What is “app load”? (Pageload)
What is “app ready”? (DOMcontentReady)
What is “view changed”? (onhashchange)
AngularJS Page cyclus Bootstrap Router $routeChangeStart $stateChangeSuccess Controller Services $viewContentLoaded
Directives View UI Router ng-route (ngView)
What to instrument? AngularJS $resource $http $templateRequest $httpBackend $compile $module
$service $controller $cacheFactory $templateCache $directives ngBind, ngClass, ngMode, ngIf, ngInclude, ngRepeat, ngSrc, ngStyle, ngSwitch, ngTransclude
$decorate to instrument
Bootstrap module.config $decorate $rootScope $viewContentLoaded Router Route controller $stateChangeSuccess $routeChangeStart
Start transaction Instrument TraceBuffer ngOpbeat TransactionStore ngView $viewContentLoaded End transaction $routeChangeStart opbeatFunctionWrapper new Trace() Transport scheduler Processing Instrumentation flow
<DEMO>
Our breakdown
Behind the scenes
None
AngularJS $injection system …
$injection toString() madness
Replicate function arguments
Resolve loaded modules
V8 + Arguments
V8 + Arguments optimized Source: https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358 Explanation: http://stackoverflow.com/questions/29198195/whats-the-deal-with-optimising-arguments
Error stack frame normalization Firefox Chrome
SpiderMonkey naming convention Source: https://developer.mozilla.org/en-US/docs/Tools/Debugger-API/Debugger.Object#Accessor_Properties_of_the_Debugger.Object_prototype
Error stack frame normalization Normalized
opbeat.com/angularjs
github.com/opbeat/opbeat-js Open Source
None
Thanks