All language subtitles for 1. Performance profiling

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

So now in this video, we want to see how this is performing by using the profiler.

OK, so I'm just going to click on the profiler and just clear out anything that's happening now.

Not necessarily interested in seeing this.

I'm mostly interested in seeing what's going on in these screens.

So what you want to do for this is basically switch on the deep profiling.

It's going to give you a much more thorough understanding of what's going on.

We can also see how the scripts are behaving with a deep profile.

We can actually find out exactly how those functions are running.

How much time in milliseconds each function is taking.

We can look for any issues or any spikes in performance.

OK, so just make sure you have your deep profile switched on before you actually press play.

So it may take a couple of seconds for it to initialize.

OK, there we go.

So I'm just now going to press play and we're just going to let this start populating.

OK, so this is the data that we've got at the moment.

Now, if you just click anywhere, that will basically stop, put the game in pause mode so that we

can see what's going on.

OK, so in the CPU usage mode, we can see what's going on with our process.

So these different blocks are telling you exactly what's happening.

So at the moment, it's wait for Target FPS.

Remember, we told it that we wanted our target frames per second to be sixty.

Well, we're forcing the processor to wait basically before it can do.

Another operation is capable of getting up to six or seven hundred frames per second.

We're forcing it to wait for 60.

Which is why we're seeing this.

This is also pretty much what's going on here with our V Sync.

All of this yellow section is we're forcing it to wait 60 frames per second.

Now, obviously, in the computer, it's going to be very different to a mobile on the mobile.

This this section is going to be very, very small because the process is only capable of getting up

to about just over 60 frames per second anyway.

And if we go into our script, into the main script and in the start, we've got our application target

frame rate equals four, which is comment that out and do a save.

And wait for that to update.

OK, we just stopped playing press clear on this and then begin again press play.

Should notice a very different kind of look, OK.

Notice that yellow section is orderly and neither the majority of this is in others.

OK.

And if we now take a look at our blocks, you can see how play a loop.

We haven't got that big yellow block and waiting for frames per second, OK?

But unfortunately, it is necessary for us to cap it at around 60 frames per second.

But that was the the main stumbling block, if you like, the thing that's causing it to wait.

In terms of performance.

So we do need that.

So let's just switch that back on again.

And since we know that the V Sync is that's basically caused by the we think it means that we're no

longer interested in this piece and can actually switch that off now.

OK, for press play again.

And I do something on the keyboard and I just stop.

We've got some initialise Asians that are taking place here.

OK, so as you can see, there's a lot more going on when we first start as compared to, for example,

up here.

All right.

You can expect that whenever you start the game, you've got a lot of initialise Asians.

You've got a lot more happening in the start.

OK, but don't worry too much about these blocks.

All right.

These these mostly just visual indications for us and people who really get into the debugging will

want to take a deeper look at these.

For us, it's not that necessary.

What we are looking for any major spikes, OK, like this one over here.

We need to understand what are causing these really large spikes.

But what do these spikes mean?

Well, on this left hand side, we've got our target frames per second, 15, 30 and 60.

Any sections where it's falling way below the 60 frames per second in line means it's easily meet in

60 frames per second.

But many of these spikes going up in in between the 60 to 30 means it's dropping below 60 frames per

second.

And then there are these spikes where it's coming to both 30 frames per second toward 15, which means

it's dropping below 30 frames per second.

Now, look, it's only on one frame.

So not too much of a problem.

But if that was consistently up here all the time, that would be a problem.

The moment we're easily meet in 60 frames per second.

No problem.

OK.

Or this section, if we just take that out, you'll see that comprises quite a bit.

Now, the others is kind of it's created mostly because we're previewing this in the editor, in the

unity editor.

If we were playing this directly on the mobile, all of that would disappear.

And this this is more accurate.

This is what we're looking at for a mobile performance.

Notice, none of those spikes are falling below 60 frames per second.

All right.

So that's good.

So all of this is created by unity itself because we're actually previewing it in unity.

And let's actually go through these and take a look individually at what's happening.

So I'm just going to switch them all off and I want to switch each one on inturn.

OK, so at the moment, we've got nothing.

So let's take a look at our rendering.

Rendering is really, really small.

All right.

In fact, below 200 frames per second or it's above 200 frames per second, should I say so?

No problems there.

Rendering is great.

All right.

We've optimized that there's almost no real lights.

All the text is really small.

Our objects are really low.

Poly frame rate, low poly.

Sorry.

So we're getting really good frame rates about our scripts.

OK, this is where we're getting a couple of spikes.

That was the initialization from our start our script.

Slight spike here.

OK, and we'll get into script profile in the next video and we can take a look through this.

And then most of it is just fine.

All right.

Really, really small.

What about physics?

Physics.

We've got this constant and repetitive motion here.

This is the A.I., you know, on the zombies when we're getting them to navigate around around the tombstones.

Once again, it's between 1000 frames per second and 250 frames per second.

Definitely nothing to worry about.

What about other nations and the nations are all consistent across all of these characters, among the

nations on them?

All well above 1000 frames per second.

So, yeah, no problem.

Garbage collection.

Now we've got these really big spikes on garbage collection.

And believe it or not, these are actually created by this little timer at the top.

We're not going to have a timer in our final belt only while we're debugging and profiling.

So all of those spikes will actually disappear later.

We think we know that's the issue where we're basically saying, Kapela, 60 frames per second, not

a problem.

Global illumination notices almost no.

No global illumination does because we've switched off our directional light and we don't have any of

the lights.

We've basically baked a light.

So no problem whatsoever there.

And then you see a little bit going on with our you either can see a couple of tiny spikes, but they're

well below what's there.

This is like 10000 frames per second.

Yeah.

No problem.

OK, so that's that's really good.

And then finally out of this, this is where we're getting our major spikes.

OK, and as we know, that's mostly from the Ed.

OK, good.

So let's take a look at our rendering them.

So on our rendering, we can see at this point in time where I'm clicked here, I've got around 20 draw

calls and 11 SEP pascals, only using about 117 megabytes use textures, 36 of Runda textures.

All right.

So pretty good.

Great for mobile.

If I just may become too aware of this bit of spike going on here.

So at this point, I've got 61 draw calls.

OK, and 22 SEP pascals.

And I'm wondering what this may be about.

Is it the.

Stance it may have been at the start.

Actually, it looks like it's possibly at the start.

And so I've got more because basically it's loading everything first time and everything still got OK.

Our memory, as you can see, there's a lot going on with our memory.

But if we take a look at our total use memory at zero point seventy gigabytes.

All right.

So it's still really, really low.

And this also allows you to break down the memory usage for the graphics, audio, video and what's

been used inside of the profiler.

OK.

As you can see, the profiler is using quite a lot of memory there.

All right.

You wouldn't normally be using the profiler so you can mine this way.

And that would give you a good understanding of how much is going to be used on the phone and audio.

You have got three audio sources and a few audio clips.

OK, we got five.

Go in there.

We'll probably have more going when we actually do start shooting and firing things.

As you can see, these are all relatively low.

You can see exactly what they're being called.

No video in the physics, as we can see.

We've got to kinematic rigid body elements and too static colliders in the.

And it's also telling us any kind of contacts and that particular bit, they're not showing any kind

of spikes.

It's all perfectly fine.

No to the physics, no networking and our UI.

OK, let's take a look at our UI.

So we've got eight batch counts on the canvas.

So as you click through these, I'll actually show you them.

So this is level one and 25.

It's batch those together.

So using the same text element, batch one is this little black ring.

Two bullets matched all those together, which is good.

Got 32 vertex counts.

That batch three is our.

It's using a different texture.

Batch four is the SHUBHAM.

Batch five is this.

Batch six is shoot text and batch seven is the actual joystick.

All right.

And we could even save some batch calls, some canvas elements there by batching everything together

into one big sprite.

But I think this is perfectly fine, to be honest.

And you can see here what's happening, Jake.

Take a look.

That's 10000 frames per second, only every now and then.

Does it spike above that?

But, you know, it doesn't even show the number above that.

It's zero point one milliseconds that it's using in terms of UI.

Definitely nothing to worry about.

And global illumination, which is any kind of lighting or that kind of thing, you know, is also extremely

low.

I mean, most of these are between 4000 frames per second and 1000 frames per second.

So definitely nothing to worry about.

OK, excellent.

That gives us a bit of an understanding of what's going on visually with an eye profiler.

What we're going to do in the next video is take a look at the hierarchy and the scripting elements

and start to understand how much time that is taking.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.