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
ru Russian Download
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:03,510 --> 00:00:08,970 So now in this video, we want to see how this is performing by using the profiler. 2 00:00:09,510 --> 00:00:17,700 OK, so I'm just going to click on the profiler and just clear out anything that's happening now. 3 00:00:17,970 --> 00:00:20,630 Not necessarily interested in seeing this. 4 00:00:20,640 --> 00:00:23,970 I'm mostly interested in seeing what's going on in these screens. 5 00:00:24,450 --> 00:00:29,310 So what you want to do for this is basically switch on the deep profiling. 6 00:00:29,610 --> 00:00:33,150 It's going to give you a much more thorough understanding of what's going on. 7 00:00:33,390 --> 00:00:37,170 We can also see how the scripts are behaving with a deep profile. 8 00:00:37,170 --> 00:00:40,860 We can actually find out exactly how those functions are running. 9 00:00:40,900 --> 00:00:44,250 How much time in milliseconds each function is taking. 10 00:00:44,520 --> 00:00:48,300 We can look for any issues or any spikes in performance. 11 00:00:48,660 --> 00:00:53,970 OK, so just make sure you have your deep profile switched on before you actually press play. 12 00:00:54,390 --> 00:00:57,420 So it may take a couple of seconds for it to initialize. 13 00:00:58,470 --> 00:00:59,370 OK, there we go. 14 00:00:59,910 --> 00:01:05,850 So I'm just now going to press play and we're just going to let this start populating. 15 00:01:08,910 --> 00:01:12,310 OK, so this is the data that we've got at the moment. 16 00:01:12,330 --> 00:01:18,660 Now, if you just click anywhere, that will basically stop, put the game in pause mode so that we 17 00:01:18,660 --> 00:01:19,830 can see what's going on. 18 00:01:20,280 --> 00:01:26,040 OK, so in the CPU usage mode, we can see what's going on with our process. 19 00:01:26,040 --> 00:01:29,310 So these different blocks are telling you exactly what's happening. 20 00:01:30,000 --> 00:01:33,120 So at the moment, it's wait for Target FPS. 21 00:01:33,240 --> 00:01:37,440 Remember, we told it that we wanted our target frames per second to be sixty. 22 00:01:37,890 --> 00:01:43,710 Well, we're forcing the processor to wait basically before it can do. 23 00:01:43,710 --> 00:01:49,290 Another operation is capable of getting up to six or seven hundred frames per second. 24 00:01:49,560 --> 00:01:51,750 We're forcing it to wait for 60. 25 00:01:52,140 --> 00:01:53,280 Which is why we're seeing this. 26 00:01:53,640 --> 00:01:57,800 This is also pretty much what's going on here with our V Sync. 27 00:01:57,810 --> 00:02:03,510 All of this yellow section is we're forcing it to wait 60 frames per second. 28 00:02:04,020 --> 00:02:08,300 Now, obviously, in the computer, it's going to be very different to a mobile on the mobile. 29 00:02:08,460 --> 00:02:13,860 This this section is going to be very, very small because the process is only capable of getting up 30 00:02:13,860 --> 00:02:16,920 to about just over 60 frames per second anyway. 31 00:02:17,820 --> 00:02:25,080 And if we go into our script, into the main script and in the start, we've got our application target 32 00:02:25,080 --> 00:02:29,790 frame rate equals four, which is comment that out and do a save. 33 00:02:32,160 --> 00:02:33,900 And wait for that to update. 34 00:02:35,610 --> 00:02:41,490 OK, we just stopped playing press clear on this and then begin again press play. 35 00:02:42,000 --> 00:02:45,870 Should notice a very different kind of look, OK. 36 00:02:45,900 --> 00:02:51,110 Notice that yellow section is orderly and neither the majority of this is in others. 37 00:02:51,630 --> 00:02:52,050 OK. 38 00:02:52,500 --> 00:02:56,910 And if we now take a look at our blocks, you can see how play a loop. 39 00:02:57,060 --> 00:03:02,460 We haven't got that big yellow block and waiting for frames per second, OK? 40 00:03:02,670 --> 00:03:07,140 But unfortunately, it is necessary for us to cap it at around 60 frames per second. 41 00:03:07,420 --> 00:03:15,920 But that was the the main stumbling block, if you like, the thing that's causing it to wait. 42 00:03:16,920 --> 00:03:18,330 In terms of performance. 43 00:03:19,320 --> 00:03:21,080 So we do need that. 44 00:03:21,100 --> 00:03:22,800 So let's just switch that back on again. 45 00:03:25,900 --> 00:03:32,260 And since we know that the V Sync is that's basically caused by the we think it means that we're no 46 00:03:32,260 --> 00:03:35,350 longer interested in this piece and can actually switch that off now. 47 00:03:36,350 --> 00:03:37,570 OK, for press play again. 48 00:03:41,890 --> 00:03:46,930 And I do something on the keyboard and I just stop. 49 00:03:47,230 --> 00:03:50,200 We've got some initialise Asians that are taking place here. 50 00:03:51,130 --> 00:03:56,620 OK, so as you can see, there's a lot more going on when we first start as compared to, for example, 51 00:03:56,620 --> 00:03:56,980 up here. 52 00:03:57,730 --> 00:03:58,120 All right. 53 00:03:58,210 --> 00:04:02,500 You can expect that whenever you start the game, you've got a lot of initialise Asians. 54 00:04:02,500 --> 00:04:04,540 You've got a lot more happening in the start. 55 00:04:05,690 --> 00:04:07,700 OK, but don't worry too much about these blocks. 56 00:04:07,750 --> 00:04:08,110 All right. 57 00:04:08,110 --> 00:04:16,460 These these mostly just visual indications for us and people who really get into the debugging will 58 00:04:16,480 --> 00:04:18,220 want to take a deeper look at these. 59 00:04:18,460 --> 00:04:20,080 For us, it's not that necessary. 60 00:04:20,710 --> 00:04:25,810 What we are looking for any major spikes, OK, like this one over here. 61 00:04:26,090 --> 00:04:29,290 We need to understand what are causing these really large spikes. 62 00:04:29,740 --> 00:04:31,330 But what do these spikes mean? 63 00:04:31,870 --> 00:04:37,900 Well, on this left hand side, we've got our target frames per second, 15, 30 and 60. 64 00:04:38,260 --> 00:04:44,080 Any sections where it's falling way below the 60 frames per second in line means it's easily meet in 65 00:04:44,080 --> 00:04:45,340 60 frames per second. 66 00:04:45,850 --> 00:04:53,140 But many of these spikes going up in in between the 60 to 30 means it's dropping below 60 frames per 67 00:04:53,140 --> 00:04:53,620 second. 68 00:04:54,160 --> 00:04:59,080 And then there are these spikes where it's coming to both 30 frames per second toward 15, which means 69 00:04:59,080 --> 00:05:01,480 it's dropping below 30 frames per second. 70 00:05:02,230 --> 00:05:03,970 Now, look, it's only on one frame. 71 00:05:04,600 --> 00:05:06,160 So not too much of a problem. 72 00:05:06,550 --> 00:05:10,450 But if that was consistently up here all the time, that would be a problem. 73 00:05:10,930 --> 00:05:13,860 The moment we're easily meet in 60 frames per second. 74 00:05:13,900 --> 00:05:14,740 No problem. 75 00:05:16,180 --> 00:05:16,510 OK. 76 00:05:16,750 --> 00:05:20,860 Or this section, if we just take that out, you'll see that comprises quite a bit. 77 00:05:21,370 --> 00:05:30,070 Now, the others is kind of it's created mostly because we're previewing this in the editor, in the 78 00:05:30,070 --> 00:05:30,820 unity editor. 79 00:05:31,150 --> 00:05:35,890 If we were playing this directly on the mobile, all of that would disappear. 80 00:05:36,010 --> 00:05:37,620 And this this is more accurate. 81 00:05:37,630 --> 00:05:40,060 This is what we're looking at for a mobile performance. 82 00:05:40,480 --> 00:05:44,260 Notice, none of those spikes are falling below 60 frames per second. 83 00:05:44,920 --> 00:05:45,250 All right. 84 00:05:45,250 --> 00:05:45,820 So that's good. 85 00:05:46,180 --> 00:05:50,680 So all of this is created by unity itself because we're actually previewing it in unity. 86 00:05:52,330 --> 00:05:58,240 And let's actually go through these and take a look individually at what's happening. 87 00:05:58,240 --> 00:06:03,070 So I'm just going to switch them all off and I want to switch each one on inturn. 88 00:06:04,120 --> 00:06:05,710 OK, so at the moment, we've got nothing. 89 00:06:05,720 --> 00:06:07,090 So let's take a look at our rendering. 90 00:06:07,600 --> 00:06:09,310 Rendering is really, really small. 91 00:06:09,700 --> 00:06:10,060 All right. 92 00:06:10,130 --> 00:06:16,120 In fact, below 200 frames per second or it's above 200 frames per second, should I say so? 93 00:06:16,120 --> 00:06:17,140 No problems there. 94 00:06:17,320 --> 00:06:18,490 Rendering is great. 95 00:06:19,060 --> 00:06:19,460 All right. 96 00:06:19,480 --> 00:06:22,510 We've optimized that there's almost no real lights. 97 00:06:22,510 --> 00:06:24,040 All the text is really small. 98 00:06:24,490 --> 00:06:25,840 Our objects are really low. 99 00:06:25,840 --> 00:06:27,940 Poly frame rate, low poly. 100 00:06:27,940 --> 00:06:28,300 Sorry. 101 00:06:28,900 --> 00:06:32,920 So we're getting really good frame rates about our scripts. 102 00:06:33,910 --> 00:06:35,920 OK, this is where we're getting a couple of spikes. 103 00:06:35,930 --> 00:06:39,040 That was the initialization from our start our script. 104 00:06:39,490 --> 00:06:41,440 Slight spike here. 105 00:06:42,100 --> 00:06:49,110 OK, and we'll get into script profile in the next video and we can take a look through this. 106 00:06:49,120 --> 00:06:51,940 And then most of it is just fine. 107 00:06:52,090 --> 00:06:52,510 All right. 108 00:06:52,510 --> 00:06:53,410 Really, really small. 109 00:06:54,400 --> 00:06:55,720 What about physics? 110 00:06:57,250 --> 00:06:57,880 Physics. 111 00:06:58,150 --> 00:07:02,890 We've got this constant and repetitive motion here. 112 00:07:03,250 --> 00:07:09,450 This is the A.I., you know, on the zombies when we're getting them to navigate around around the tombstones. 113 00:07:09,910 --> 00:07:14,890 Once again, it's between 1000 frames per second and 250 frames per second. 114 00:07:15,280 --> 00:07:16,900 Definitely nothing to worry about. 115 00:07:18,280 --> 00:07:24,070 What about other nations and the nations are all consistent across all of these characters, among the 116 00:07:24,070 --> 00:07:24,790 nations on them? 117 00:07:25,420 --> 00:07:28,810 All well above 1000 frames per second. 118 00:07:28,810 --> 00:07:30,790 So, yeah, no problem. 119 00:07:31,570 --> 00:07:32,560 Garbage collection. 120 00:07:33,190 --> 00:07:35,920 Now we've got these really big spikes on garbage collection. 121 00:07:36,250 --> 00:07:40,810 And believe it or not, these are actually created by this little timer at the top. 122 00:07:41,440 --> 00:07:46,210 We're not going to have a timer in our final belt only while we're debugging and profiling. 123 00:07:46,540 --> 00:07:49,120 So all of those spikes will actually disappear later. 124 00:07:50,560 --> 00:07:56,860 We think we know that's the issue where we're basically saying, Kapela, 60 frames per second, not 125 00:07:56,860 --> 00:07:57,310 a problem. 126 00:07:58,090 --> 00:08:01,240 Global illumination notices almost no. 127 00:08:01,240 --> 00:08:06,160 No global illumination does because we've switched off our directional light and we don't have any of 128 00:08:06,160 --> 00:08:06,830 the lights. 129 00:08:06,910 --> 00:08:08,320 We've basically baked a light. 130 00:08:08,710 --> 00:08:10,420 So no problem whatsoever there. 131 00:08:11,800 --> 00:08:17,950 And then you see a little bit going on with our you either can see a couple of tiny spikes, but they're 132 00:08:17,950 --> 00:08:20,500 well below what's there. 133 00:08:20,590 --> 00:08:22,810 This is like 10000 frames per second. 134 00:08:23,800 --> 00:08:24,190 Yeah. 135 00:08:24,340 --> 00:08:25,000 No problem. 136 00:08:25,130 --> 00:08:27,220 OK, so that's that's really good. 137 00:08:27,670 --> 00:08:31,580 And then finally out of this, this is where we're getting our major spikes. 138 00:08:31,610 --> 00:08:34,240 OK, and as we know, that's mostly from the Ed. 139 00:08:35,890 --> 00:08:36,790 OK, good. 140 00:08:37,840 --> 00:08:40,390 So let's take a look at our rendering them. 141 00:08:40,990 --> 00:08:45,550 So on our rendering, we can see at this point in time where I'm clicked here, I've got around 20 draw 142 00:08:45,550 --> 00:08:55,090 calls and 11 SEP pascals, only using about 117 megabytes use textures, 36 of Runda textures. 143 00:08:55,180 --> 00:08:55,540 All right. 144 00:08:55,540 --> 00:08:56,950 So pretty good. 145 00:08:56,980 --> 00:08:57,970 Great for mobile. 146 00:08:59,200 --> 00:09:03,460 If I just may become too aware of this bit of spike going on here. 147 00:09:03,970 --> 00:09:06,490 So at this point, I've got 61 draw calls. 148 00:09:06,850 --> 00:09:08,830 OK, and 22 SEP pascals. 149 00:09:09,370 --> 00:09:14,680 And I'm wondering what this may be about. 150 00:09:15,400 --> 00:09:16,360 Is it the. 151 00:09:17,700 --> 00:09:20,400 Stance it may have been at the start. 152 00:09:20,490 --> 00:09:23,160 Actually, it looks like it's possibly at the start. 153 00:09:23,580 --> 00:09:31,170 And so I've got more because basically it's loading everything first time and everything still got OK. 154 00:09:31,770 --> 00:09:35,010 Our memory, as you can see, there's a lot going on with our memory. 155 00:09:35,430 --> 00:09:40,440 But if we take a look at our total use memory at zero point seventy gigabytes. 156 00:09:40,950 --> 00:09:41,250 All right. 157 00:09:41,250 --> 00:09:42,690 So it's still really, really low. 158 00:09:43,860 --> 00:09:49,080 And this also allows you to break down the memory usage for the graphics, audio, video and what's 159 00:09:49,080 --> 00:09:50,910 been used inside of the profiler. 160 00:09:51,500 --> 00:09:51,870 OK. 161 00:09:52,050 --> 00:09:55,770 As you can see, the profiler is using quite a lot of memory there. 162 00:09:56,220 --> 00:09:56,610 All right. 163 00:09:56,620 --> 00:10:00,750 You wouldn't normally be using the profiler so you can mine this way. 164 00:10:00,750 --> 00:10:07,590 And that would give you a good understanding of how much is going to be used on the phone and audio. 165 00:10:07,860 --> 00:10:11,380 You have got three audio sources and a few audio clips. 166 00:10:11,430 --> 00:10:12,360 OK, we got five. 167 00:10:12,390 --> 00:10:12,930 Go in there. 168 00:10:13,410 --> 00:10:18,060 We'll probably have more going when we actually do start shooting and firing things. 169 00:10:18,630 --> 00:10:21,840 As you can see, these are all relatively low. 170 00:10:21,870 --> 00:10:23,770 You can see exactly what they're being called. 171 00:10:24,960 --> 00:10:28,250 No video in the physics, as we can see. 172 00:10:28,260 --> 00:10:34,650 We've got to kinematic rigid body elements and too static colliders in the. 173 00:10:35,850 --> 00:10:43,770 And it's also telling us any kind of contacts and that particular bit, they're not showing any kind 174 00:10:43,770 --> 00:10:44,440 of spikes. 175 00:10:44,460 --> 00:10:45,600 It's all perfectly fine. 176 00:10:46,260 --> 00:10:50,520 No to the physics, no networking and our UI. 177 00:10:50,790 --> 00:10:52,170 OK, let's take a look at our UI. 178 00:10:52,530 --> 00:10:55,540 So we've got eight batch counts on the canvas. 179 00:10:55,540 --> 00:10:58,050 So as you click through these, I'll actually show you them. 180 00:10:58,100 --> 00:11:00,510 So this is level one and 25. 181 00:11:00,510 --> 00:11:01,680 It's batch those together. 182 00:11:02,100 --> 00:11:06,600 So using the same text element, batch one is this little black ring. 183 00:11:07,500 --> 00:11:11,010 Two bullets matched all those together, which is good. 184 00:11:11,100 --> 00:11:12,750 Got 32 vertex counts. 185 00:11:12,750 --> 00:11:14,670 That batch three is our. 186 00:11:15,510 --> 00:11:17,070 It's using a different texture. 187 00:11:17,640 --> 00:11:20,100 Batch four is the SHUBHAM. 188 00:11:20,640 --> 00:11:23,280 Batch five is this. 189 00:11:24,300 --> 00:11:32,160 Batch six is shoot text and batch seven is the actual joystick. 190 00:11:32,490 --> 00:11:32,910 All right. 191 00:11:33,480 --> 00:11:40,950 And we could even save some batch calls, some canvas elements there by batching everything together 192 00:11:40,950 --> 00:11:42,150 into one big sprite. 193 00:11:42,750 --> 00:11:46,680 But I think this is perfectly fine, to be honest. 194 00:11:46,800 --> 00:11:49,860 And you can see here what's happening, Jake. 195 00:11:49,890 --> 00:11:50,370 Take a look. 196 00:11:50,410 --> 00:11:53,580 That's 10000 frames per second, only every now and then. 197 00:11:53,580 --> 00:11:55,110 Does it spike above that? 198 00:11:55,470 --> 00:11:59,340 But, you know, it doesn't even show the number above that. 199 00:11:59,340 --> 00:12:03,000 It's zero point one milliseconds that it's using in terms of UI. 200 00:12:03,510 --> 00:12:04,950 Definitely nothing to worry about. 201 00:12:08,290 --> 00:12:15,880 And global illumination, which is any kind of lighting or that kind of thing, you know, is also extremely 202 00:12:15,880 --> 00:12:16,140 low. 203 00:12:16,150 --> 00:12:21,820 I mean, most of these are between 4000 frames per second and 1000 frames per second. 204 00:12:21,820 --> 00:12:23,470 So definitely nothing to worry about. 205 00:12:24,610 --> 00:12:25,780 OK, excellent. 206 00:12:25,900 --> 00:12:33,250 That gives us a bit of an understanding of what's going on visually with an eye profiler. 207 00:12:33,610 --> 00:12:40,270 What we're going to do in the next video is take a look at the hierarchy and the scripting elements 208 00:12:40,270 --> 00:12:44,170 and start to understand how much time that is taking. 18664

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