Debugging memory leaks - HTTP 203

  Рет қаралды 44,018

Chrome for Developers

Chrome for Developers

Күн бұрын

Jake and Surma tackle one of the hardest types of debugging on the web: Memory leaks.
Some links mentioned:
Squoosh → goo.gle/2OQBnGG
Leaky version of Squoosh, so you can try the tools for yourself → goo.gle/3A7Lwni
Original bug report → goo.gle/3jhl7wj
Resize/Intersection observer bug reports:
Chrome → goo.gle/3rOXM9l
Firefox → goo.gle/3s3u54B
Safari → goo.gle/3xlerT8
More videos in the HTTP 203 series → goo.gle/HTTP203
Subscribe to Google Chrome Developers here → goo.gle/ChromeDevs
Also, if you enjoyed this, you might like the HTTP203 podcast → goo.gle/HTTP203Podcast
#HTTP203 #ChromeDeveloper #WebDev

Пікірлер: 86
@hypersonic12
@hypersonic12 2 жыл бұрын
For me, this was one of the most useful episodes so far, on a tool I have mostly avoided thus far. Also it felt like reading a suspense novel after every “success.” Thanks for the great walkthrough!
@jakearchibald
@jakearchibald 2 жыл бұрын
I've added a link to the leaky version of Squoosh in the description, in case you want to follow along
@itsdevdom
@itsdevdom 2 жыл бұрын
These episodes could be an hour long and I wouldn't mind. Great content as always!
@mc-ty4br
@mc-ty4br 2 жыл бұрын
I feel like we're passively/partly enabling Apple to keep on slowing down the web by supporting its browser. Sometimes, I just wanna add a banner telling people to use a proper browser. In my last job I had a native datepicker, and for safari, i had a input/text with clickable question mark next to it that alerted "your browser does not support date pickers, please enter date manually dd-mm-yyyy"
@dhkatz_
@dhkatz_ 2 жыл бұрын
This seems like an uninformed answer. All three major browsers do a great job in certain areas and less than great in others. None of the development teams *want* any of these bugs to exist, they're bugs. Safari is usually not too slow to fix things like this anyways.
@robertosantanaperdomo9388
@robertosantanaperdomo9388 2 жыл бұрын
Wow, guys! Keep it up with this format, I loved it. It has been one of the episodes I've learned the most and I can actually use this to solve my everyday problems.
@wladmeixner76
@wladmeixner76 2 жыл бұрын
Exactly the procrastination I needed while learning for my exams, really glad to see you’re back!
@cintron3d
@cintron3d 2 жыл бұрын
Really informative and entertaining as always, so glad you're back!
@dynamics
@dynamics 2 жыл бұрын
Yay! Thank you! Google Chrome Developers series is my favorite! 😄
@mc-ty4br
@mc-ty4br 2 жыл бұрын
That was worth the wait. Thank you all, it was great 👌
@gabrielmachado7315
@gabrielmachado7315 7 ай бұрын
I work on a big typescript application, and memory leaks haunt us from all places, kind of 70% us, 20% libraries, 10% browsers fault. Sometimes I think it would be easier if we write everything in C.
@spidfire
@spidfire 2 жыл бұрын
Epic, I never know how to tame the memory tab. Could you maybe do other features of the inspector in following episodes?
@Obscurania
@Obscurania 2 жыл бұрын
Such a good episode!
@technikhil314
@technikhil314 2 жыл бұрын
Am I the only one who likes video before watching it fully? My mind after watching this video: Lets run and analyze memory on every site that we have created. :)
@jakearchibald
@jakearchibald 2 жыл бұрын
Everyone should do this, I reckon
@technikhil314
@technikhil314 2 жыл бұрын
@@jakearchibald Yup Cant agree more. I would spread the word for you for free. But there is hardly anyone who listens to me :)
@HazzMan2409
@HazzMan2409 2 жыл бұрын
Jake and Surma are the Messi and Ronaldo of the software dev world 😄 Constantly amazed by their smarts and I’m thrilled that they share it with us mere mortals!
@saidooubella
@saidooubella 2 жыл бұрын
They're more like Chet and Romain from Android staff!
@autodidact2590
@autodidact2590 2 жыл бұрын
It's great learning things. Awesome explanation. If video gets longer.please keep it following video as part - 2 so on. It's helps alot in understanding the things under the hood.
@shamsartem
@shamsartem 2 жыл бұрын
guys you are the best. this content is pure gold
@FallingDreamFlowingSand
@FallingDreamFlowingSand 2 жыл бұрын
Thanks for this episode, it was very informative.
@switchfoot-7777
@switchfoot-7777 2 жыл бұрын
Haven't watched fully yet. But last mem leak issue i had was related to Audio context, the mem used there cannot be seen in devtools and must use taskmanager. That day i learnd that mp3 loaded into an js context takes 10x the filesize in mem.
@jakearchibald
@jakearchibald 2 жыл бұрын
Decoded audio will always take up more space than compressed audio (like decoded images in this episode), but please file a bug about the lack of attribution in devtools!
@DenisTRUFFAUT
@DenisTRUFFAUT 2 жыл бұрын
Great episode !
@shubhamlatiyan7972
@shubhamlatiyan7972 2 жыл бұрын
Awesome information guys
@luluakram
@luluakram 2 жыл бұрын
that safari memory usage,, 1.2 GB by the end.. that's just surprising. thank you for the video, super helpful.
@ctna211
@ctna211 8 ай бұрын
Insightful and lovely convsersation! thanks.
@pdkama
@pdkama 2 жыл бұрын
nice content, well presented. Thanks
@tkv559
@tkv559 2 жыл бұрын
Wow this feels great, learn many things here
@NitinPasumarthy
@NitinPasumarthy 2 жыл бұрын
Another insightful conversation / presentation. Thank you! Is there a way to detect these leaks in production via RUM?
@weizhiyang6873
@weizhiyang6873 10 ай бұрын
This is really helpful video! Thanks a lot!
@GiovanniOrlandoi7
@GiovanniOrlandoi7 2 жыл бұрын
Great video!
@mayankvora8116
@mayankvora8116 Жыл бұрын
What a great explanation 👍
@rishabhanand4270
@rishabhanand4270 2 жыл бұрын
you guys are the best
@ehsankhorasani_
@ehsankhorasani_ 2 жыл бұрын
Thank you very much. it was so much informative
@LeeSmith-cf1vo
@LeeSmith-cf1vo 2 жыл бұрын
I'm liking the new "studio", although those raining artifacts are really annoying. I think it would be useful to have a similar episode to this but talking about the DOM itself. How can we minimise the memory usage when we have a very large DOM? Also, it seems like it would be useful if those memory tools had a button that can remove from the snapshot anything that is _only_ referenced by the console
@r0ger80
@r0ger80 2 жыл бұрын
its funny that even a google channel makes fun of Chrome`s memory usage problem xD
@kalleguld
@kalleguld 2 жыл бұрын
It's not a problem, it's a feature. Since everything you do should be on the web anyway, the browser might just as well use all your memory :)
@krasimirk
@krasimirk 2 жыл бұрын
Wow great. nice point of logging in console is breaking memory usage. keep going
@firiasu
@firiasu 2 жыл бұрын
Nice subject!
@Sudharshaunvilla
@Sudharshaunvilla 2 жыл бұрын
I like how they gently pulled the leg of Safari and Firefox :P
@hashzones
@hashzones 2 жыл бұрын
very useful and interesting, memory leaks debugging is always dev-time leaks :S
@rajshekharmishra9151
@rajshekharmishra9151 Ай бұрын
Really interesting 👍
@PierreSoubourou
@PierreSoubourou 2 жыл бұрын
excellent ! and quite readable even on smartphone ;-)
@CyberAcidPlanet
@CyberAcidPlanet 2 жыл бұрын
The big question is: do we have to remove listeners from elements that are going to be removed from DOM or are they automatially destroyed if the element is garbage collected after removal?
@GuskiS
@GuskiS 2 жыл бұрын
DOM nodes always cleanup after themselves, meaning that listeners are removed/freed. However, working in a world of components, it is easy to forget to handle global listeners properly. In React it is generally done in useEffect callback function.
@SimonBuchanNz
@SimonBuchanNz 2 жыл бұрын
Event emitters are pretty much literally just an array of listeners, so it's less "cleaning up after themselves" and more the GC just tosses the lot out at the same time. In practice the GC is just making things easier: you still have the basic problem of having to ensure that you have a protocol for ensuring things are cleaned up after they are no longer used (at least you don't have the problem of making sure they aren't cleaned up before they are used!)
@gouravkhator
@gouravkhator 2 жыл бұрын
Both were event listeners, that's great
@BipinOli90
@BipinOli90 2 жыл бұрын
Fantastic
@ZMYaro
@ZMYaro 2 жыл бұрын
May I ask what set-up you are using to control your slides with a Joy-Con? 👀
@jakearchibald
@jakearchibald 2 жыл бұрын
It's just bluetooth, so it connects as a gamepad. Then we're using the gamepad API in the browser to pick up button presses.
@ZMYaro
@ZMYaro 2 жыл бұрын
@@jakearchibald Oh, I didn't realize Joy-Cons map like regular gamepads-thanks!
@riddixdan5572
@riddixdan5572 2 жыл бұрын
Would be awesome if we could do something similar in node.
@thomasmeerpohl2438
@thomasmeerpohl2438 2 жыл бұрын
the studio seems professional but the audio is somehow bad.
@jakearchibald
@jakearchibald 2 жыл бұрын
Yeah, we had some sound issues in this series, sorry about that.
@waldemarenns4874
@waldemarenns4874 2 жыл бұрын
4:18 - my favorite scene 🤯😂😂😂
@avi98717
@avi98717 2 жыл бұрын
I didn't get what is unfoldable thing at 10:49 . Can some explain.
@jakearchibald
@jakearchibald 2 жыл бұрын
The bit where is displayed? That's the JS console
@delulu6969
@delulu6969 2 жыл бұрын
Is window.matchMedia any more performant than window.onResize? Or it depends?
@jakearchibald
@jakearchibald 2 жыл бұрын
Roughly the same in terms of performance I imagine. I went for matchMedia because it followed what we were doing in CSS
@aymanpatel5862
@aymanpatel5862 2 жыл бұрын
So you use a memory leak profiler to find a memory leak in your app only to find memory leak in the profiler itself. 😂
@jakearchibald
@jakearchibald 2 жыл бұрын
haha not just the profiler, it was a leak in Safari in general!
@M2Pochomkin
@M2Pochomkin 2 жыл бұрын
Where is upvote 100 times button
@SaurabhKumar-ee6dj
@SaurabhKumar-ee6dj 2 жыл бұрын
Is it possible to use ram for cache not my ssd
@jakearchibald
@jakearchibald 2 жыл бұрын
--disk-cache-dir lets you change the location of the cache, and you could create a ramdisk for this if you wanted. I don't know what you're trying to gain from that, and I don't recommend it, but that's all I know.
@SaurabhKumar-ee6dj
@SaurabhKumar-ee6dj 2 жыл бұрын
@@jakearchibald thank uou so much sir ❤
@victornpb
@victornpb 2 жыл бұрын
The trash can with an X in the top right is a CollectGarbage button in Safari
@jakearchibald
@jakearchibald 2 жыл бұрын
hah, I think I assumed that was "delete". Same UI problem as Chrome.
@wmhilton-old
@wmhilton-old 2 жыл бұрын
Oh Safari
2 жыл бұрын
15:55 😂
@Manish-fm5iv
@Manish-fm5iv 2 жыл бұрын
Interesting...
@mishasawangwan6652
@mishasawangwan6652 2 жыл бұрын
safari is the new ie
@jimiscott
@jimiscott 2 жыл бұрын
No more bedrooms!
@jakearchibald
@jakearchibald 2 жыл бұрын
Hey, there was only ever one bedroom. Unless you think I sleep in my study? Which… I guess is believable.
@dassurma
@dassurma 2 жыл бұрын
You just wait. I’ll demand that there’s a bed on our set!
2 жыл бұрын
Am I the only one seeing the artifacts in the video?
@jakearchibald
@jakearchibald 2 жыл бұрын
What kind of artifacts? What quality are you watching at?
@YOUTUBEACEHBERDIKARI
@YOUTUBEACEHBERDIKARI 2 жыл бұрын
Hello,, salam kenal dari aceh
@cintron3d
@cintron3d 2 жыл бұрын
First!
@ruby_gleyzes
@ruby_gleyzes Жыл бұрын
Great video!
Are SPAs better than MPAs? | HTTP 203
25:42
Chrome for Developers
Рет қаралды 42 М.
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН
Ну Лилит))) прода в онк: завидные котики
00:51
How to find MEMORY LEAKS in Ionic Angular Apps
24:23
Simon Grimm
Рет қаралды 9 М.
It's viewports all the way down | HTTP 203
43:35
Chrome for Developers
Рет қаралды 29 М.
DOM ready events considered harmful | HTTP 203
22:09
Chrome for Developers
Рет қаралды 26 М.
Diagnosing memory leaks in .NET apps
37:32
dotnet
Рет қаралды 32 М.
Slashing layout cost with content-visibility - HTTP 203
18:14
Chrome for Developers
Рет қаралды 34 М.
You Suck At Accessibility (But You Don't Have To)
13:23
Web Dev Simplified
Рет қаралды 51 М.
Transport Layer Security (TLS) - Computerphile
15:33
Computerphile
Рет қаралды 467 М.
Demystifyingish SVG paths | HTTP 203
17:34
Chrome for Developers
Рет қаралды 20 М.
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 79 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,4 МЛН
The power button can never be pressed!!
0:57
Maker Y
Рет қаралды 55 МЛН
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
superfirsthero
Рет қаралды 1 МЛН
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,7 МЛН