Supercharged Q&A: May 2016
Skills:
Frontend Performance80%
Key Takeaways
Answering performance questions in Supercharged Q&A
Full Transcript
[Music] welcome to this supercharged now normally when we do our videos we get lots of comments we get lots of questions on Twitter you know loads of things that kind of come into us and so we thought why not let's actually take a step back and answer some of those questions how are svgs rendered they seem quite slow are they GPU accelerated if so in what ways I have actually no idea cool I do so they're actually D elements um they uh not only the SVG but every child is a actual Dom element right all the like rectangle right so you got to be careful because uh if you move them around they're going to trigger layout but the layout operation will stop at the SVG route it's one of the times we actually have what we call a layout boundary where the layout actually is not document scoped it's going to be scoped to the SVG element what you look at that yeah the other thing is that transform normally we like you know promotee this into its own layer and then transform it around that doesn't work in SVG context in Chrome I'm not sure about other browsers but in Chrome we don't promote anything to its own layer when you actually add like wheel change or translate Z it's always a repaint it's always a repaint so you got to be be cautious with that to be fair I actually expected that for an SVG because I think for some reason I think of more than canvas likee than anything else right right but hopefully hopefully some point that you know optimization might land don't know though uh and then are the GPU accelerated they can be if you got GPU rasterization switched on in fact one of the the best ways to improve SVG performance today on mobile is to make sure that you've got GPU rization for at least for Chrome and the way to get that if you just Google for I think it is actually um magic viewport chromium possibly uh or I think is Ganesh or GPU rasterization Chrome one of those will get you into the world that you need to be in next question is it possible to disable I don't know why they put quotes anyway is it possible to disable web animations on very very very very very slow devices it has to be at least five and they put three tortoise emojis afterwards I think I know what that person is they're going for slow going fully slow devices I I can't think of a way to adapt your animations really I I think what you could do POS potentially the uh performance obs server that is in the works at the very least right now could eventually help you do this my first intuition when I read this question was that maybe you can kind of abuse uh request idle call back because that will only be called if your web page is not too busy and if that is being called you could use that to enable your web animations go the other way around having disabled by default and basically enhance your web page with the animations provided is is not under too much of a load yeah the problem I had with that is that your now main thread can so if you're animating with JavaScript right all your animations are coming from the main thread which is fine so you can then test for main thread availability with request AO call back or request animation frame or both but if you've got something that's like uh a CSS animation that is done with say a transition and you're just using the compositor thread and it's just going to keep going even if the main thread is janked up then you can't use that technique cuz it's going to be like well I can't do any animations right now and the problem I have is that um even with the frame timing API it's still only main thread availability so it's kind of going to benefit anybody who's animating JavaScript but it's not going to benefit anybody who's animating just purely with say CSS or something like that overall though I the thing I wanted to kind of ask myself was is it the right decision to disable the animations in the first place right because I was like if your ux can stand not having the animation it feels like you don't need the animation right animations just shouldn't be for the sake of IDE usually they serve a point and if they don't serve a point then you might as well skip them because it's about being you know a little bit mindful about the user resource right right so I was like but I get it's a sliding scale and somebody might be like hey it's an added bonus if your device can take it or whatever as I say I don't I don't think you can do it reliably today and I don't know of anything that's like in the works that's just like this is a cast iron way of saying this device should be good to go but I think you're right request out of callback is probably the closest we're going to get well there you go so those are the questions that you asked and uh we would invite you to ask more questions in the comments below Twitter I'm at aerot twist at dma that's like that's like the Sera but in German which I learned I I'd forgotten all my German until I taught him he he did he did uh so ask your questions ping us on Twitter and we will catch you next time [Music] a
Original Description
Got performance questions? In this episode of Supercharged Q&A, Paul and Surma answer some questions you have sent in!
Watch more episodes of Supercharged here: https://goo.gl/WFD8py
Subscribe to the Chrome Developers channel at http://goo.gl/LLLNvf
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Chrome for Developers · Chrome for Developers · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Polymer Performance Patterns (The Polymer Summit 2015)
Chrome for Developers
Polymer Power Tools (The Polymer Summit 2015)
Chrome for Developers
Chrome Dev Summit 2014 – Chrome Case Studies
Chrome for Developers
Web Directions Code 2015 round up
Chrome for Developers
Maintainable Code - HTTP203
Chrome for Developers
iron-ajax… wat?! -- Polycasts #26
Chrome for Developers
The Guardian - Supercharged
Chrome for Developers
ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
Chrome for Developers
#AskPolymer: Rob answers all the questions ever -- Polycasts #27
Chrome for Developers
The Future of JavaScript - HTTP203
Chrome for Developers
Data Binding 101 -- Polycasts #28
Chrome for Developers
The Guardian part 2 - Supercharged
Chrome for Developers
The Future of Web Audio: with Chris Wilson and Chris Lowis
Chrome for Developers
Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome for Developers
Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Chrome for Developers
#AskPolymer: How do you make the show? -- Polycasts #29
Chrome for Developers
Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Chrome for Developers
Binding to Objects -- Polycasts #30
Chrome for Developers
Player FM - Supercharged
Chrome for Developers
Where’s the Designer? #AskPolymer -- Polycasts #31
Chrome for Developers
Jake Beats Wikipedia - HTTP203
Chrome for Developers
Supercharged Observers! -- Polycasts #32
Chrome for Developers
Jai's Web blog - Supercharged
Chrome for Developers
Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Chrome for Developers
What about internationalization? #AskPolymer -- Polycasts #33
Chrome for Developers
Developing for Billions (Chrome Dev Summit 2015)
Chrome for Developers
Google+ Performance Improvement Comparison
Chrome for Developers
Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Chrome for Developers
Progressive Web Apps (Chrome Dev Summit 2015)
Chrome for Developers
Instant Loading with Service Workers (Chrome Dev Summit 2015)
Chrome for Developers
Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Chrome for Developers
Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Chrome for Developers
Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Chrome for Developers
Polymer - State of the Union (Chrome Dev Summit 2015)
Chrome for Developers
Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Chrome for Developers
Introduction to RAIL (Chrome Dev Summit 2015)
Chrome for Developers
DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
Chrome for Developers
RAIL in the real world (Chrome Dev Summit 2015)
Chrome for Developers
#ChromeDevSummit talks are up - W00T! -- Polycast #34
Chrome for Developers
V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
Chrome for Developers
Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Chrome for Developers
Owning your performance: RAIL (Chrome Dev Summit 2015)
Chrome for Developers
HTTP/2 101 (Chrome Dev Summit 2015)
Chrome for Developers
Leadership Panel (Chrome Dev Summit 2015)
Chrome for Developers
Build Processes, Totally Tooling Tips (S2, Ep 5)
Chrome for Developers
Accessibility (Chrome Dev Summit 2015)
Chrome for Developers
Binding to Arrays -- Polycasts #35
Chrome for Developers
HTTP2 - HTTP203
Chrome for Developers
Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome for Developers
Call For Submissions - Supercharged
Chrome for Developers
Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Chrome for Developers
Testing AJAX with Web Component Tester -- Polycasts #37
Chrome for Developers
Slack: Extended Xmas Special - Supercharged
Chrome for Developers
Browser testing with Travis & Sauce Labs -- Polycasts #38
Chrome for Developers
Optimize for production with Vulcanize -- Polycasts #39
Chrome for Developers
Highlights from Chrome Dev Summit 2015
Chrome for Developers
Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome for Developers
Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Chrome for Developers
How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
Chrome for Developers
Colors – DevTools Tonight #0 (Pilot)
Chrome for Developers
More on: Frontend Performance
View skill →Related Reads
📰
📰
📰
📰
Inside the Wayfair Frontend SDE-2 Interview: A Complete Breakdown
Medium · Programming
I Spent Two Years Maintaining a React SPA. HTMX Rebuilt It in a Week
Medium · Programming
The 5 Levels of Front End Engineering (And Where Most Developers Get Stuck)
Medium · Programming
Browser-Based PDF Editing with Vue 3 and pdf-lib
Dev.to · sunshey
🎓
Tutor Explanation
DeepCamp AI