Diagnosing Performance Issues in Hazel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up guys my name is channel something a little bit different for you here today so a couple days ago i did a live stream over on twitter tv slash the channel i've been trying to stream more often so uh give that one a follow or subscribe if you've got amazon prime now i know that of course not everyone has the ability to just sit down and watch a live stream as it's happening and even if you do go back and watch over the twitch vods sometimes it can be difficult because they go on for hours so what i thought i'd do is take out some of the more useful parts of my live streams things that i think could be useful for other people and post them here on this channel so this kind of clip i mean it feels weird to call it a clip because it's like 40 something minutes long but this kind of section of the live stream from a couple days ago was about me diagnosing some performance issues that i was having inside hazel to be honest it's a little bit like watching a bit of a movie trying to figure out what on earth was going on here so i hope that you guys do enjoy this one let me know what you think of this kind of content and i will see you guys next time goodbye what i wanna what i wanna take a look at here is um a bit of a performance issue and i'm not sure why it happens but basically when we shoot and we hit the first time we do this right so the current setup we have is that we fire a projectile it's like a little a glowing green cube when it hits something it destroys itself and spawns this kind of explosion of orange spheres but the first time this happens there's like a couple frames where it just drops right so there's a bit of a delay it takes a long time but then it's fine on subsequent attempts so i'm in release mode here by the way but if i click to fire hey you can see that pause there it's probably like a 100 millisecond pause or something like that maybe a bit less um and these will stay around forever but then now if i fire again there's no pause right and i can keep firing and obviously you can see it's not dropping frames and everything is like pretty fine right so and they'll never just they'll never disappear at the moment but for some reason the first time i do this you can see that pause right and then subsequent times it's totally fine right so why is this happening not sure um let's let's investigate let's take a look at it now i know that at the moment what's happening is that when you initiate as i i already kind of know maybe what it is i think it's the fact that it has to initialize the script for that sphere but the sphere no hang on the sphere doesn't have a script though so what i did was um this actual prefab right what is it explosive particle 2 this doesn't actually have a script attached to it so what it's got is it's got a mesh a point light a rigid body and a box collider a box collider it's a sphere that's weird let's um maybe we should add a sphere collider to it yeah do we actually do we render we render physics stuff right yeah so okay so that's what the collider looks like at the moment let me just hide those icons so the light's not in the way this is what it looks like um so maybe let's remove that and let's add a sphere collider okay you can see it in green uh we've got a sphere collider now and that looks better so let's um maybe go back to our prefabs and drag in this we'll call explosive particle three uh explosive particle three oh we've already got ep3 i wonder what the difference is ep3 it's also a box collider yeah whatever um so explosive particle three is what we're up to yeah this is unfortunate because our current prefab editing situation is non-existent so we'll drag in p1 uh where is it here let's drag in explosive particle 3 now so that's the prefab reference and we'll call this p3 uh and now i will delete literally everything else so let's delete maybe p1 ep3 explosive particle two p3 is a good one right guys okay this one this one i hope i haven't deleted anything good p3 back into here control s and now now should be the same but we should have a sphere collider yeah so we still see that pause oh but i didn't lock the transform was that bad ah sorry i didn't lock the rotation whatever i don't care so yeah so we've got that let's um hide the physics colliders okay so no we don't have any anti-aliasing of any kind at the moment so yes jaggi is a jagged um we'll probably add in like fxaa or something um i don't really care too much about it like at the moment i'd rather spend my time elsewhere so i'm not gonna do anything temporal just yet in the future probably and msaa and stuff is decent but it it it will it'll slow down stuff in the pipeline obviously because we'll have to multi-sample um so fxaa is probably what i'll use uh just because it's really simple and it's quite quick it's just one pass and that's it um okay so yeah so so it's interesting because again there is nothing there's nothing going on from a script point of view that's what i thought could be it but i know that nothing like like what what is that pause right because nothing should be yeah nothing should be there okay so let's close so this is how we're gonna debug it right we're gonna close this then we're going to uh come over here and i'm gonna find some stuff that we can take a look at so i have um we're going to use the profile that we use which is called optic we're going to hook that up if i can find um is it in gui or is it build build no uh gui bin release yeah there it is okay so let's uh let's send that to the desktop because i like to keep that around we can run it as administrator if we want uh we're not running hazel as administrator but no big deal i don't think i need that and then what i'm gonna do is uh i am going to hit play and then i'm gonna go into optic i'm gonna hit a record and then i'm gonna fire and then i'm gonna go back and hit stop okay so what we should be able to see in optic is a massive frame 268 milliseconds and it was all inside c sharps on update function so the projectile on update function took a a lot of time 261 milliseconds right so that's clearly the uh the pause that happens here now is it the actual c sharp code i probably doubt it um i don't think it's that i think that it's most likely something else that it's calling so i mean it's doing a few things it's doing create entity here and it's doing create entity with id so this is the prefab instantiation stuff but there's clearly a lot of stuff that it does that is not pro not instrumented so i actually want to instrument it again we don't really have to if we were super cool and we are pretty cool actually we are cool so let's take a look at this i could just get the sampling side of optic to actually take a look at it so if we go into where am i um if i go into let's just uh i think is dev master working yeah it is okay so if i go into um bin release hazelnut yeah so we'll run uh it's not gonna work is it let's create a shortcut um let's set the working directory to be hazelnut actually it might must might set its or anything but whatever we'll run it as a as administrator um and we should be able to get the sampling side of things to work so let's clear all this data hit play uh did that even work connection failed play again yep stop 40 megabytes i think this is definitely a bit more data now uh yes there is more data let's find the long frame here it is 273 milliseconds we had some long frames here i'm not sure why synchronization stuff maybe but anyway uh this is it now we didn't get any more data okay we'll have to instrument it unless no this is nothing where's the um what is it the syscalls no the flame graph the flame graph um well there it is on update entity call method whoa do it to string minimal unresolved and then some other stuff so the flame graph is kind of helpful as well because it shows some stuff but yeah script oh and then hazel call method what's hazel call method interesting yeah that's fine hmm get asset instantiate with translation 1.5 well yeah it shouldn't this is all very very fast so what is it that is being so annoying huh okay let's close that let's go back and let's actually see what that prefab function is doing right so if we look at uh [Music] projectile which i think is it so on update so this is what happens right and obviously it happens on destroy so what we do is we instantiate 10 different particles this is what i was doing on on the live stream two days ago um uh so something here ah could it be this add force function well okay so there's a few parts here first of all instantiate is a thing right this will actually create a new entity then we have add four and again the thing that is almost like the thing that is kind of suspicious here right is that it's not not that it's suspicious i should say i guess where where's my stuff man threads um is that it's actually the projectile function that's taking a quarter of a second right it's not like some other thing if it was in physics or if it was in somewhere else we would know it's directly like a it's a it's a synchronous call it's always hard to say asynchronous because it sounds like you're saying asynchronous but no it's a it's a synchronous call coming from this exact function right so it has to be something here now again i think that um there's console output well the console outputs it's just this i don't think that's the slow part right we are trying to load an invalid physics material mm-hmm so loading invalid entities might be not optimal um also on physics update is failing there are some things here that are but that that i think is just happening all the time that should be fine nothing should be that slow consoles are slow but they're not that they're not 266 milliseconds for 10 lines slow um so i don't think it's the console i mean look we can obviously compile that out and i i guess we should just to simplify this but i'm pretty sure that it's um gonna be like either instantiate or add force or destroy but destroy this is only happening for one entity but we are initializing we are creating 10 of these but again guys don't forget that it's happening the first time so again it does make me think that it's trying to access a resource or like uh like it's trying to load an asset or something like that um possibly but let's take a look at this so instantiate so i want to add instrumentation to some more stuff so if we go into cncp we have this instantiate function it's not instrumented at all i don't know why i guess i just had didn't go get around to it actually a lot of stuff here as an instrument so we have this hd profile function uh define right which will which we use for instrumentation so actually pretty much everything should be uh instrumented right so we'll we'll leave profile funk here copy component could be interesting maybe we should do that we'll profile this just because if there's a component who has a copy constructor that's taking a long time which come to think of it we did add quite a lot of data into script component which wasn't there in the previous version of hazel so that's possible that's possible that that's causing the the issue but create prefab entity instantiate i want this stuff profiled uh you know find entity by tag sure all of this stuff really should be instrumented um so uh like let's add this stuff in uh and obviously like you know this is uh only used if profiling is turned on so we don't we don't necessarily need to run uh hazel yeah there's so many new functions um that have been added that okay that's that's probably good so so let's try this let's try this again and yeah we don't need to rely on sampling i think for this might even turn that off i'll leave it is it possible to step through the script no um i can't at the moment we haven't actually uh we can't connect the debugger maybe that's something peter wants to take a look at he does like looking at stuff um [Music] hey okay i sent peter a message we'll see if he can do that at some point um all right so why do you prefer macros instead of verity const expression template functions i don't know what you're talking about so uh i have i have both um and i use both so yeah anyway uh so let's i guess we'll do the same test again now that we have a bit more data and we'll see if um [Music] ah what don't tell me was the printing that doesn't make any sense though because because we print every time though so what's just the first time that we print that's weird well it looks fine now so it was the printing are you for real let's add the printing back in what what's the printing is it because it has to initialize the console is it because it's the first time we've printed it has to be that what on earth let's print okay let's leave the printing in but then we'll add something random in the oncreate function like literally random hello okay let's see if this has a slowdown oh it doesn't okay oh no but it does guys i don't know if you saw that but it happens on instantiate now see that was a delay and if you don't if you can't really see it on the stream uh fret not because i'll record it for you in in optic that actually didn't didn't seem that bad but there it is i think is this 40 millisecond one no maybe not no here it is 133 milliseconds on runtime start right no no sorry that's not it either that's the that's the actual when i hit play in the editor uh this is probably it create prefab entity and then this is the create function right no but this is the actual creating entity part oh because that probably runs the oncreate function because we didn't censor it right but then this is projectile on oh this is on update so it can't be this hmm how interesting but anyway that's weird i think it is yeah i think it's just the fact that um [Music] that it's the first time that it's been printed or something uh anyway we shouldn't be using the console though like in all seriousness we shouldn't be using this right like at the moment what happens is we use c sharps console.writeline which we shouldn't be using because we should be using something that first of all can go into this log that we have here right because this log um like you know no one's gonna be in the grand scheme of things no one's gonna be running running um this side by side right this is just something we use like during development the actual console so printing in this thing should be way faster and it should be um we can kind of already do it and i'm pretty sure that like let's go to log.h because because i know that app app messages from c plus plus show up there right so a good example is if i click we still have a an intersection being printed here so it actually will print what the ray when you do the ray picking like what entities it intersects right so you can see that if i position it like here or whatever and i'll intersect a bunch then it'll intersect two things or like three things or whatever right um so those intersections uh they get printed from c plus plus code which by the way it's a good candidate to remove them um actually let's remove them now because otherwise i'll never remove them so this happens here and it's called intersection here it is hz1 because it's an h said one and not a core one it gets printed in the app client kind of side of things and that's also why it appears in here um because that's the way this console works so that means though that if we go back to the log file class uh then we can see how that even happens um so we can you can see we have so editor console logging macros but how does that get there right because so hazel log get editor console logo so okay so that's just a console logger and i guess um so that's also a speed log logger and then i guess this kind of gets connected to the app one at some point editor console syncs yeah so appsyncs you can see they they don't just go into the app file and also stand it out it also gets put into editor console sync what's that one thing here the console sync so that's a all right okay yeah so peter actually wrote all of this um so it's the first time i'm actually looking through this card uh but okay it seems pretty standard um so editor console panel push message is what happens but we need to format it and do all this stuff to it so i think that um at the end of the day it's just a said console log these these functions just need to be able to be called from from c sharp land so so the the question is how do we like what do we want to do how do we want to make how do we want to write these right so if we want to log something like uh this force what do we do um should it be like i guess it should be like log one whoa don't tell me peter's already written this oh my goodness me peter needs a promotion damn dude i was gonna like spend the next hour on this so we've had this all along in hazel and i haven't even known so what if i just do this for example let's just do like um info holy smokes i'm actually like shook what how have i not been aware of this holy guacamole yeah well there you go i mean it also prints it here but notice how i think it's faster no well there is a bit of a pause and again i think that's just the console to blame but i'm sure what you could probably do um is that at the moment right these loggers actually do show up in the like it it does it it targets both but what i think should probably happen is um the editor console shouldn't do this right and if you don't add this to it then it won't do it so let's let's comment this out just for fun and now what's going to happen is anything that we write in c sharp isn't actually going to appear in this log now in the grand scheme of things i don't think i want that because um it is nice to have it maybe maybe to a file would be better actually to a file right um oh no uh okay that that should be okay they've got the same pattern anyway um let's do this instead of this code so that we can do as many as they as as exist hmm [Music] yeah super interesting um this whole like slow situation i wonder why like i mean i i um that wasn't particularly fast either okay well let's um and does that happen yeah that does well there is a bit of a pause versus no pause that's the thing that's interesting to me right there is no pause the second time why is that the case right all right where are we big frames that is the uh runtime start i keep including that accidentally that's nothing uh maybe that is something okay so this still is but projectile what on update so there's still there still is something inside on update that's taking all of this time right is so this part we presume is the log well but we can kind of tell right because it's it's we do one single instantiation here it takes point one millisecond right this is us instantiating a single entity that's this line here then right and and remember like obviously this isn't like we do more than one of these instantiate but this is the first one we're doing ten we're creating ten new entities when there's a collision right so that's the first one and then this is the remaining like nine and they take varying times this one takes almost point one this one takes point zero one like they take they're actually faster than that first one but the point is between the first one and the second one there's like 50 milliseconds right so that means that the only other code that is between the two is this and yes suspiciously log.info is in fact there right but then now that's our function so we can actually profile that if we want but the other thing it could be again is this add force which logically you you might think maybe that is a bit yeah yes vector three destructs um but like no yes it's def it's definitely not like heap allocation or anything that's causing the issue here i don't think um we are generating random numbers again not really though i don't really think that's the problem and we do have add force i want to add so add force i want to i want to basically pro i want to instrument log info and all the log functions and also add force i probably won't keep the instrumentation inside this because it's useless but add force i guess maybe you know that's worth instrumenting so add force i don't even know what that calls in c plus plus land so let's take a look so if we go to the script wrappers we can take a look at the add force function rigid body add force that sounds like that's it none of these by the way are instrumented but that's okay because they're mostly just retrieving stuff and then we have add force in the actor so this stuff i do wanna um h said uh is it this i think it is that i think it's just not included yeah it is that so let's include the profiler and like the thing is with the instrumentation like you want to be kind of careful because you get to a point where there's just if you're if you're instrumenting functions that do get called a billion times per frame then you're just gonna have too much data it's gonna be slow it's gonna be hard to deal with right so this is definitely something that you wanna be careful with um so i'm not just adding it everywhere but like add force i feel like you know and i might remove it if i see that it's like nanoseconds then whatever you know but if it's something that actually takes time i might keep it um so let's restart this um oh you know and log log as well so log okay so what happens with the log right so let's let's take a look because again peter wrote this so i actually have no idea what happens with it um but if we if we open up the log dot cs file then log message native is what happens right so that means that if we go back to here we look at the script wrap as we look at log message native which doesn't exist and how are you joking oh no sorry it's just called log message we don't use the word native in their native code okay so this just does h said console log trace okay so what we can do is actually add um just into here will be enough to see if it is logging or not if we add our profiler which i guess just hasn't even been added um let's go ahead and do hsn profile funk here right um and then uh [Music] i don't trust that called monash training to utf-8 but like again like the thing that the thing the the thing that you have to remember with this particular performance thing that we're diagnosing is the fact that it only happens the first time so if the messages are unique every time right because they can they contain random values they literally contain randomly generated numbers these strings so it's definitely like um you know it could still be that it could still be like some buffer that's pre-allocated and then reused or something like that that so there's like a performance penalty the first time we call it and again this isn't a huge deal like i don't want to i want to emphasize the fact that this happens during debugging and logging stuff to the console like this is very non like distribution build material um but it's still something that i'm interested in uh pursuing for like the next five minutes probably so let's so we've got the log function we've got the physics add force function now let's take a look and see uh what's up so uh what am i doing again this this is what i'm doing okay uh let's hit play first this time so that we don't get the noise play again sometimes you have to hit it twice we shot we stop and we didn't need to stop but yeah we'll stop that i just get confused because it's like a bunch of stop buttons okay this is probably it right it's not nothing is here is it a c-sharp like memory allocation cost or something because look it's it's not here instantiate is here but then like what takes so long here and there's the log message .022 milliseconds right and again i think we've we've fixed the first one right um we fixed the first uh like as in we used to have like this is not being this is not being uh logged to the actual console anymore right so this is just this is just being effectively added to a vector or a buffer of source which eventually im gui will render in this kind of uh like a log over here so so at the time of calling the log function there should be nothing in terms of like oh it's printing to the console and flushing stuff and synchronizing or between threads or whatever so it shouldn't be doing that anymore so again what we're back to this issue of what is going on i'm beginning to think this is this is in fact in c sharp land and instantiate again is very fast right so we we um we do the instantiate function and it's happy with it so we know that we've progressed past this line so the next is just basically this because like the logging happens later i am beginning to think that it's something to do with the random class and this is temporary this is just what is random this is yeah this is a system random from c sharp i don't know if that has like some kind of uh like maybe it needs a seed or it does something here but it shouldn't the constructor should do that right and the constructor happens before any instantiation isn't this strange okay well shouldn't it be allocation of random by instance in c-sharp allocation of random well this happens before this right and this instantiate function is what uh this is this is instantiate right so we're we're not interested in this so much as this this empty space here before the next well before log message and there's add force by the way point zero zero four milliseconds so between log message so the only thing that we have left guys the only thing we have left is this it's just these two lines and again like so new vector three like vector three is a struct um we have a struct we're creating a struct no issues should be no issues there whatsoever randomness double is the only culprit i can think of unless our our profiling data is strong does c sharp guarantee that new random is before instantiate um that's a good question this is in release mode so it is in fact possible that maybe it has done some stuff here's another thing we could do right so we could move random to happen uh on create but again oncreate uh and again i know that this is like not perfect this like design of how i'm using random numbers but this is a little simple script guys like you know it's not um so we could try doing this right it will perhaps create a pause in the oncreate function this could be static it could be somewhere else whatever um but let's just see what we can do with this right um let's try and build that so so in this case it definitely shouldn't happen at any point right um [Music] uh yeah yeah so my next my next step is going to be to change the random number to not random number and see if that's the case but let's see okay yes we still get the pause okay we still have the pause it's it's a lot smaller than it used to be but it's still there and i just can't handle it so what was that let's do that again that was weird maybe we still got it but i want to do it again ah it's because i didn't um hit escape last time play shoot stop stop okay so where are we where are we at there it is 59 well i mean 59 milliseconds is a lot better than 200 something but yeah so it's still same situation um by the way the create function uh do we know when the create function happens no oh what's this oh okay look guys so this is it this instantiate function that's what creates the projectile so the projectile really only lasted for 15 frames right so when we shot that was this right that's actually that took a decent amount of time for some reason create prefab entity that took like seven milliseconds why is that so slow that whole update took 12. that's that's significant maybe we should investigate that as well because i'm pretty sure subsequent firings don't take that much time um but anyway uh but yeah again 55 milliseconds for this one [Music] also get one random number in oncreate could do that okay let's try that and then after that and i'll probably have to like print it because it'll it's in a release it might optimize it out so let's just do that um oh i think that may have fixed it yeah so it is the random number generator because look now when i fire i think there's a bit of a pause but there's not a pause when i um when i collide anymore so let's try that like uh if i try that i mean profile that so let's hit play we'll fire it stop i always keep getting stopped there um but yeah let's see that okay so look at that so we have a 62 millisecond delay now but look it's in the create prefab entity in the instantiate from fps player so fps player is the player controller script that when you click it spawns that cube so it's the random number generator and it's specifically i guess the first time you call next double right so the first time that you call next double it freaks out so now c sharp source code is on the internet isn't it uh so like dot net framework source code i'm pretty sure it's up there right it's on github it's open source on github so let's see for fun just to wrap this up nicely and neatly let's see if we can find this so system and that system maybe no i've ruined everything okay let's just let's just search for it can i just start typing how do i search again random.cs just googling the file i found it aha okay i don't know what version this is from or whatever but i'm assuming that next double has some kind of ah let's call it jumps to this sample internal sample um i mean it doesn't look like it does any kind of like special stuff on the first time you call it right next double that's definitely what i was using right yeah random next double i yeah again i don't even know what version that's from it's reference source it seems like it should be fine though like it should be what we're using yeah so they kind of all call sample at the end of the day and then that calls internal sample which is this function here which seed array just an array of 56 yeah so so this definitely like when you when you hit random right um it calls this with environment tick count which i guess is some kind of internal clock so it calls this other constructor with a seed that is just like the current time and then this obviously does do some initialization in the constructor that's what it seems to do right again not really seeing anything here that would take 50 milliseconds right but it is uh i mean like these for loops are like 55 and they're just some math so like don't really see anything major but like sam internal sample seems even internal sample does nothing right look at what it's doing it's doing nothing it's doing some arithmetic like not much arithmetic either i'm very overexposed i just checked the camera um but anyway what how interesting doesn't have framework 4.8 now i'm not using 4.8 though i think i'm using 4.7 let's just check um i think it's 4.7.2 from memory 4.7.2 see how good am i i know my own engine 4.7.2 so uh can i switch to that doesn't look like it what if they completely chose to rewrite it nah i don't think they have that but like if it's on github why why why is it why could i not find it here oh this is years ago actually but look four eight is here not framing four eight they only do they only keep the they're probably like.net core and stuff now right but yeah i'm shocked that i couldn't find random.cs is it because [Music] oh my gosh it's because i typed in okay so in github if you type in random.cs it can't find anything because it doesn't include file names in its search it only searches through code so it was always here here it is oh 4.6 okay this is an older version but again it looks identical i don't know why they would suddenly decide oh yeah let's rewrite the whole random class and make it slow but like weird i don't know um [Music] it i i don't know okay people are linking helpful stuff maybe avoiding multiple instantiations don't know framework initializing two random number generators in tight loop or not yet that was never happening never ever was that happening there was no what i was doing before right before i moved it up because again now i'm not doing anything i'm creating it and then i'm doing next double and then that's this these two lines of code and specifically this code is taking 50 milliseconds now i am i am also logging it but that i don't think it's the logging that's ma what if it's logging but we we tested it without logging right and it was still slow was it but again no no okay yeah sorry it can't be the logging because we profiled it and we did log in for and we know that the slowness was between instantiate and log info so we know that it was this so yes so we did do that um and again remember guys logging in this case anymore is not logging into the console it's logging to it's logging into a vector essentially that is then let it be displayed in the ui so it's not actually like console logging um but yeah what i was doing before though was here right i was doing this sorry not entity i was doing this right and so this means this is an on update if destroyed right so if we have a collision we destroy just that way because we can't um we can't like uh we can't instantiate new physics bodies inside a collision inside a collision callback so we um [Music] uh defer it to the next update and then we destroy this current entity as well so this does not get another update after this so this code even though it's in on update runs once only once per green cube that we shoot not per like orange ball that we that is our that is our explosion a lot of a lot of stuff going on man a lot of stuff going on anyway so that's being said if you now you're only creating random instances but not using it so if it lags on shot it means no no so it's not like um this does not lag anymore now what's like there is no lag so what i did is i added this line here right to make sure that we actually generate at least one random number using this and there is now a delay here if i remove this so the first time we call random next double is inside here it's the it's this code that lags that like takes 50 milliseconds the first time so we know that it is it seems to be random next double now another thing we could do is like c sharp has some timers right we could just see sharp time of this right that would probably be very simple um and that'll probably be the best solution i think for the just to like make sure that's actually that so like c sharp timer um there's just a timer class we can just do sell like is this a good performance timer i don't know if it's good for performance but ah whatever okay so let's do um uh timer timer this is some threading system threading timer system threading all right okay so the same thing so let's try this i don't even know if this is like a good timer with an infinite period and an infinite due time using uh oh wait that's probably not what i want uh maybe i should go c sharp performance timer it's been a while since i've uh done that try not logging the next result to the next table yeah i'm i'm gonna do it outside of logging don't you worry oh yeah stopwatch sorry that's it in system diagnostics yes stop watch give me that and let's get rid of threading well actually we don't need like anything here stopwatch and does that start immediately apparently you can do start new uh and then we can do dot stop stop w dot elapsed milliseconds and we'll log that in our uh well we'll log that actually into the console how about that stopwatch okay let's do that not the best uh but like again and i've left the log in there for now but that's just temporarily right um should we maybe make this a bit smaller ah i'm exposed all right um so let's uh i hate it when windows does that by the way i need to turn that off um so uh let's i don't know why i'm still printing this stuff um let's hit play okay that should have already done it oh no sorry it's when we when we shoot on exception beautiful guys we did it why oh no what [Music] you're really gonna give me an exception be nice if we knew which exception but of course i'm uh i only care if it's a null reference exception um so we got this right if exception doesn't equal not yeah let's let's maybe like um actually write what exception it is that would be useful let's do that but we don't know what it is well it's exception it's probably got this stuff right oh but okay um uh well it has to be an exception surely it has to be the base class right look i'm being all c sharpie here instead of using cast operators aren't you guys proud of me all of ea's tools are pretty much written in c sharp by the way so i do have quite a bit of c sharp experience um from like my ea days um all right so um [Music] so let's uh let's just hit play and see what the exception is could not load us what
Info
Channel: The Cherno
Views: 38,069
Rating: 4.9342971 out of 5
Keywords: thecherno, thechernoproject, cherno, c++, programming, gamedev, game development, learn c++, c++ tutorial, game engine, how to make a game engine, game engine series, slow, hazel, hazel engine, optimization, optimisation, performance issues, optick profiler, profiling, c++ performance, diagnostic, fixing slow code, faster code, fast code
Id: iY6QbL_3L2I
Channel Id: undefined
Length: 48min 35sec (2915 seconds)
Published: Fri Aug 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.