Performance evaluation tool

Hello Needle,

I work on different types of project, sometimes having to be versatile on both the phone and the computer.
Sometimes only on the computer. However, I have a fairly powerful computer and sometimes I overestimate the performance of my application.

So, for the time being, I’m using the ‘Device’ developer tools for phones, and the ‘CPU limit’ function in Opera to simulate lower performance during my development.

But this isn’t very accurate, it only gives a relative idea of the type of device the application might run on.
But in no way a pragmatic analysis of each performance linked to each part of the code, which would allow a performance gain per iteration (much less blind).

I’ve tried using the browser’s recorder, but it’s still not very accurate.

Does Needle have this type of tool specific to 3D web development?

Original Post on Discord

by user 224464722878005248

Hey! So you mean specifically tracking performance on a device over various iterations of your code?

Generally device-specific performance is, well, device-specific and needs to be tested, ideally on the loweset common denominator device you want to support

E.g. for us that’s often Quest 2 (at least when VR is involved), almost everything else is faster

Yes, I understand, but sometimes it’s much broader than that.
For example, in the context of more PC-oriented web development, there’s often a huge difference between a $300 PC, a Mac Air and a desktop PC with a graphics card.
And sometimes it’s very complicated to know if it’s versatile enough but above all to recognise which part of the code specifically is the most demanding.

For example, my current project has a number of features including distance calculations, ray tracing, a physics engine, management of sometimes complex models, etc. etc.

It quickly becomes very complicated to assess the precise weight of each feature in performance.

Given that Needle manages the scene, and groups together most of the functions that act on the scene.

I was thinking that a performance tracker internal to Needle, which could be activated with debugPerformance=true, could be very useful.

by user 224464722878005248

Because even if you are iterative, there are sometimes features that are heavy but do not pose a problem at time t because they are not used simultaneously at time t+1.

Similarly, when a feature starts to be used on more objects, etc etc

And even if you set up a debugging structure where it generates a performance database etc etc, if you multiply the features and objects it quickly becomes unreadable or too complicated. But if you add a performance analysis mode within each component, it will make the visualisation uniform and therefore easier to format.

by user 224464722878005248

I see, thanks for the additional details.
We currently mostly rely on platform-specific debugging tools when it gets to the nitty gritty of performance characteristics.

  • On a very basic level, there’s the ?stats debug flag that gives you an FPS counter.
  • Then there’s the chrome profiler, which has tons of analysis tools and we often use it to find why CPU is slower than expected.
  • Then there’s RenderDoc, very useful with Chrome and also with Quest for low-level rendering debugging, but not so useful for GPU performance insights

Yes, I already use these tools, I’ll try to use RenderDoc in this case.

It was just a suggestion because performance debugging in three js is quickly more complicated than in classic web (I find).

I thought that Needle had both the environment and a great opportunity to add value by integrating a more intuitive and visual tool for use in 3D web development.

by user 224464722878005248

  • it could be great if we want to debug performances with other web engine than chrome

by user 224464722878005248

Agree, we can probably do better in that regard. Thanks for the suggestion!

Okay yes I just download RenderDoc and it seems useful but really not intuitive interface xD

by user 224464722878005248

And, of course you can use the debugging tools in all browsers (I often use the Safari and Firefox tools as well)

You’re great, thanks to you

by user 224464722878005248

I will try to find tutorials to use RenderDoc

by user 224464722878005248

I found only this old tutorial :

by user 224464722878005248

(which is just a demo, not a tutorial aha)

by user 224464722878005248

One note, I recently discovered a Quest OS bug with RenderDoc together with @elZach– it prevented capturing immersive sessions and I notified the relevant Meta team. Not sure if that has been fixed by now

(but only relevant on Quest and for immersive sessions, shouldn’t affect regular Chrome / 2D captures)

Okay thanks, I don’t use Needle for VR/AR immersive content right now but it is noted

by user 224464722878005248