How to use the React Profiler to find and fix Performance Problems

  Рет қаралды 157,320

Ben Awad

Ben Awad

Күн бұрын

Пікірлер: 80
@shivroy652
@shivroy652 5 жыл бұрын
Dude. You are beautiful. You know what developers want to see. One of the best video on react profiler. to the point no more non-sense .
@IvanLeshchenko-q1w
@IvanLeshchenko-q1w 5 жыл бұрын
best video about react profiler for now. nice and simple. thank you!
@samartajshaikh2601
@samartajshaikh2601 2 жыл бұрын
This is really one of those which everyone wants to know about but don't know where to start. Thanks for this video. 👍
@jguix
@jguix 3 жыл бұрын
Thank you, that was a really concise and good explanation on how to use the profiler and interpret flame graphs, just what I was looking for.
@ShawnRice-eg3il
@ShawnRice-eg3il 4 ай бұрын
Great rundown. Thanks!
@TuanNguyen-vk4fu
@TuanNguyen-vk4fu 4 жыл бұрын
Thank you, Ben. The best video explanation for profiler in react.
@VerySadBatman
@VerySadBatman 4 жыл бұрын
This was awesome! I'd really love to see how you structure your React app to scale. Please do a video on that 🙏.
@bawad
@bawad 4 жыл бұрын
Are you talking about folder structure?
@VerySadBatman
@VerySadBatman 4 жыл бұрын
@@bawad Yes. Folder structure; where you decide put things like components, contexts, tests, and how they all come together.
@bawad
@bawad 4 жыл бұрын
kzbin.info/www/bejne/g2XVipmnasuihqM
@blyfo
@blyfo 2 жыл бұрын
this is a great question
@md.mashnoorsaifkarim3453
@md.mashnoorsaifkarim3453 Жыл бұрын
@@blyfo I second that
@tyrrelldavis9919
@tyrrelldavis9919 3 жыл бұрын
Yo I'm having the same problem with redux atm. Am on Linux, seems like it's a function that keeps running itself forever or something. Makes my entire computer freeze after a little bit of time. Hopefully will be fix by end of today. Ben is one of best js KZbinr, much abundance quality & humor
@markhyoutube
@markhyoutube 2 жыл бұрын
Fantastic performance guide, many thanks!
@kirillzlobin7135
@kirillzlobin7135 9 ай бұрын
Profiler is apparantly very useful thing
@beeenthere
@beeenthere 5 жыл бұрын
Thanks for this! Really helpful.
@pawanmittal6166
@pawanmittal6166 3 жыл бұрын
Awesome Video with superb explanation.
@kidShibuya
@kidShibuya 4 жыл бұрын
Super confusing because that action took 154ms but everything in the profiler says less than 3ms?... The CocktailBrowser says it took just .7ms?...
@cebuch.
@cebuch. 2 жыл бұрын
very helpful and packed with only needed info
@vinayadiga1674
@vinayadiga1674 6 ай бұрын
Thanks Sir!
@sushmitakumari8252
@sushmitakumari8252 Жыл бұрын
Outstanding.. this is what I expected 😊
@luanecarolineaquinocavalca1064
@luanecarolineaquinocavalca1064 Жыл бұрын
thank you! very well explained
@yusf1945
@yusf1945 Жыл бұрын
Thanks man. This is really good one
@cubiq1
@cubiq1 5 жыл бұрын
7:54 The Chip component's color prop will not be strictly equal (===) when its parent (IngredientPicker component) re-renders because of the inline function. This could potentially trigger a re-render of _all_ mapped Chip children whenever IngredientPicker re-renders. Same goes for the onClick handler prop. Surely these inline functions should be removed before relying on things like React.memo()?
@bawad
@bawad 5 жыл бұрын
good point
@umnajdi
@umnajdi 2 жыл бұрын
I didnt get what you mean. can you explain more?
@samuelaraujo9099
@samuelaraujo9099 Жыл бұрын
@@umnajdi basically, when you define a function like () => yourAnotherFunctionCall() inside a props, you are creating a new ref, so everytime parent component rerender the reference will be different, so child component will rerender
@serenestrolls-d7b
@serenestrolls-d7b Жыл бұрын
@Mayank Ramina Dont create inline functions. Create named functions and use useCallback hooks to memoize them.
@billyfigueroa1617
@billyfigueroa1617 Жыл бұрын
Great video!!! I’ll be using this for work. Hopefully we are on the right version so the profiler shows up
@Jrrs2007
@Jrrs2007 2 жыл бұрын
This was great!!!!! More guidance on the tools!!!!!! Please 😁
@nbaua3454
@nbaua3454 3 жыл бұрын
Best content on your channel..keep it coming
@TheOrlstefano
@TheOrlstefano 4 жыл бұрын
Great video. Really helpful. Thanks a lot
@deepwebtube
@deepwebtube 3 жыл бұрын
Great inputs sir!
@aqua123670
@aqua123670 5 жыл бұрын
awesome, thanks
@HOLONIA4EVER
@HOLONIA4EVER 2 жыл бұрын
Very useful, thanks.
@tegaogheneovo5881
@tegaogheneovo5881 3 жыл бұрын
Oh shoot exactly what I need, been at this for a whole day bro trying everything this is a fairly standard approach..thanks😔 lol ask Ben first
@punisher013
@punisher013 3 жыл бұрын
excellent! thanks man
@petrosc7608
@petrosc7608 Жыл бұрын
great video, thanks a lot
@victorfigueiredo6031
@victorfigueiredo6031 Жыл бұрын
Excelente vídeo, me ajudou demais!
@jivkojelev3744
@jivkojelev3744 4 жыл бұрын
Is there any special setting for render count ? I don't see the count in my profiler.
@DrNoxer
@DrNoxer 4 жыл бұрын
When you pass callbacks or raw objects to the components and you're doing it directly on it: blabla={() => ...} or blabla={{ ... }}, those fail the comparison check of react, since objects and functions get a new address and the JS comparision compares the addresses, making: {a: 10} == {a: 10} be false, therefore, for raw objects you should useMemo() and for raw callbacks, useCallback()
@cristiantorres853
@cristiantorres853 2 жыл бұрын
how to use the lazy loading as you mentioned?
@segevitsky
@segevitsky 3 жыл бұрын
Cool video thanks!
@zoladkow
@zoladkow 2 жыл бұрын
granted, this vid is about a workflow with profiler, but the most prelevant message i think gets across is to just throw more memo here and there 🤷😁
@ankitmehrotra8519
@ankitmehrotra8519 4 жыл бұрын
Hey Ben..Great video as usual. A small request for video for optimization of javascript app, react app, code splitting.
@nxshipon6470
@nxshipon6470 2 жыл бұрын
Josss sir Thanks YOU
@cryptonative
@cryptonative 4 жыл бұрын
Hi Ben. Thanks for this very informative video. What’s the name of cocktail app you are optimizing in this video?
@rhidlor8577
@rhidlor8577 3 жыл бұрын
Thanks
@jamesfoo8999
@jamesfoo8999 3 жыл бұрын
Thanks :) The text documentation just wasn't sinking in.
@speculativesapient7139
@speculativesapient7139 Жыл бұрын
How do you get the extra information for components about total renders, props etc.? It seems the default setup doesn't provide that information.
@HaibertBuilds
@HaibertBuilds 3 жыл бұрын
You should make the same video for react native!
@ShumiGupta
@ShumiGupta 5 жыл бұрын
Can you provide the chrome extension you used to get react in developer console tab? I used react developer tool extension using which I am not able to get total number of times component renders.
@bawad
@bawad 5 жыл бұрын
Make sure you have the latest version of react
@ShumiGupta
@ShumiGupta 5 жыл бұрын
@@bawad thanks for the reply. Yes I have latest version of react and react developer tool but it looks like they have made some changes in recent version now they are not showing the number of times component got rendered. I haven't got chance to check the change log will check and if I found something I will post the reason here. If you got to know something about this please share it with me.
@ShumiGupta
@ShumiGupta 4 жыл бұрын
They have made multiple changes to optimize performance. So I would recommend all to review change log as they have mentioned all the changes made.
@shirshak6738
@shirshak6738 5 жыл бұрын
nice :) Seems like everybody should use at least to get insight how performant their app is running.
@arvindvs8934
@arvindvs8934 3 жыл бұрын
Is there a tutorial video for the cocktail app shown in this video? Can someone please guide
@neeraj1bh
@neeraj1bh 3 жыл бұрын
Is the Profiler API from docs and Profiler Tab in Dev Tools same.
@gabrielloubier8662
@gabrielloubier8662 4 жыл бұрын
This is not useful anymore as there is no "total render" count in react dev tools
@mohammadalioruji4025
@mohammadalioruji4025 3 жыл бұрын
cooool
@christiangyaban9666
@christiangyaban9666 5 жыл бұрын
nice one
@jamesherrero7334
@jamesherrero7334 4 жыл бұрын
@5:53 you uses a short cut to delete only that one word, how???
@bawad
@bawad 4 жыл бұрын
dt) benawad.com/vim
@vishaljain8868
@vishaljain8868 4 жыл бұрын
fn+option+delete
@EverAfterBreak2
@EverAfterBreak2 3 жыл бұрын
ctrl + delete in windows
@TheNishant30
@TheNishant30 Жыл бұрын
1:41 that's what she said.
@arvindvs8934
@arvindvs8934 3 жыл бұрын
Is the app in this video using Material UI?
@w1pe0ut
@w1pe0ut 3 жыл бұрын
Yes ,it is. (Material UI for React, of course)
@hiteshagja24
@hiteshagja24 3 жыл бұрын
Video volume is very low.
@popuguytheparrot
@popuguytheparrot 5 жыл бұрын
why are you using HOC withStyles if in v4 add useStyles hook
@Deliverant
@Deliverant 5 жыл бұрын
It's not his application i presume
@bawad
@bawad 5 жыл бұрын
Yep
@popuguytheparrot
@popuguytheparrot 5 жыл бұрын
@@bawad can you do video about effector.js ?
@bawad
@bawad 5 жыл бұрын
at some point yes
@MikeyHogarth
@MikeyHogarth 5 жыл бұрын
It's my app (hi Ben - I nearly had kittens when I saw this vid) - easy answer to this is that v4 wasn't out when I started, it came out mid-project - plus I'm not in the habit of just hookifying everything just because there's an API for it, sometimes it's advantageous to use HoC's.
The Best React Helper Tool - React Dev Tools Tutorial
23:30
PedroTech
Рет қаралды 6 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 57 МЛН
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 51 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 64 МЛН
How To Maximize Performance In Your React Apps
12:58
Web Dev Simplified
Рет қаралды 104 М.
JavaScript Memory Leaks and How To Fix Them
14:58
Software Developer Diaries
Рет қаралды 27 М.
Beginner React.js Coding Interview (ft. Clément Mihailescu)
36:31
Ben Awad
Рет қаралды 2,1 МЛН
React Developer Tools | Components & Profiler
12:57
Raul Terhes
Рет қаралды 36 М.
How to Roll Your Own Auth
13:05
Ben Awad
Рет қаралды 111 М.
Preventing React re-renders with composition
12:11
Developer Way
Рет қаралды 20 М.
8 React Js performance optimization techniques YOU HAVE TO KNOW!
11:23
How To Debug React Apps Like A Senior Developer
21:07
Web Dev Simplified
Рет қаралды 139 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 57 МЛН