What could cause dropped frames?

I’m getting a profile like this:

What could be causing these dropped frames? It seems the CPU code is fast enough. The GPU peaks seem to be enough to drop some frames (but shouldn’t it be async?). But there are a lot of frames that are apparently dropped for no reason. This is not a temporary hiccup, it’s consistent. It’s running on a mobile, on a PC I don’t get this.

Any idea of what is going on and what can be done to improve the performance? Thanks.

Do you see it only in the devtools or are the frame drops also “feelable” when you run the experience.

If the first, I had this for a while on Chrome locally which I suppose to be a perf tool bug.

If the later, it might be that you are GPU bound :slight_smile: and looking into the babylon instrumentation might help validating this

1 Like

It’s feelable. fps goes to ~20, which is consistent with the profiling. And why I was profiling in the first place, who cares when things are working properly :slight_smile:

I thought if I were GPU bound I’d see a big hit on the GPU line. But no, because that would actually make sense! You’re right, after enabling GPU tracing and the instrumentation the GPU frame time is very high. Thanks.

Is there a middle ground for profiling the GPU, something between commenting parts of code and SpectorJS?

not that I am aware of unfortunately :frowning:

You can try to use PIX to look closely at what is happening in a frame and which draw calls are taking time.

Note that the GPU thread in the perf log is really a specific thread/process that handles the GPU commands: it is not the actual time the draw calls take on the GPU! To know this, you can either look at the “GPU frame time” in the inspector for the overall total time or use PIX for more detail.

Thanks, I didn’t know about PIX. Unfortunately things are slow on mobile phones, and I’m not sure if the bottlenecks will be the same.