+2 votes

I do not understand everything the profiller can offer.

could someone explain the basics to me?

asked Sep 11, 2017 in Engine by PerduGames (180 points)

2 Answers

+2 votes

I guess you're talking about the current stable version of godot (2.1.4).

The profiler (+the other tabs like "Monitor") helps to identify actual or potential performance problems in your application.

You'll start it while the app is running and you can select different topic which can be added to the graph.

You'll see the frame rate and also how much cpu physics or script functions use depending on the current state of the game. You can also do changes in the node tree of scene files and watch the performance changes. I.e. you can hide certain groups/nodes and watch if there's an impact on the frame rate.

If you develop for android, you can also link the device via usb & network, set up the editor and can then do the same on a mobile device (profiler node-tree on pc, while the app is running on the mobile device). It sometimes helps to not debug on the best performing device :)

Remote debugging/profiling may not be the simplest to set up but is extremely helpful+comfortable if it works. It helped me to identify some performance problems caused by 3d physics (custom 3d collision meshes vs. 3d areas caused some performance hits).

answered Sep 12, 2017 by wombatstampede (3,193 points)

I'm using 3.0, is it different? how do I measure the time a code spends to be paid using the profiller?

I think it is similar in 3.0. (Didn't check the android profiling, yet).

As far as I know the profiler isn't directly comparable to standard-profilers which usually run and then give you i.e. a summed up execution time per function at the end.

Instead it shows the values & graphs of certain run times in real time. If the app runs, you should be able to see (& select for graphing) the execution time/frame + numer of calls / frame of individual functions below "Script Functions".

Additionally to the script function performance it'll also give you the run times for i.e. physics and other time-eaters of the game. ;-)

@wombatstampede custom 3d collision meshes vs. 3d areas What is faster? Can you explain please?

What I wanted to say is that I experienced severe performance problems when PhysicBodies with custom collision shapes collided with Areas which had simple boxshape collision shapes.

So for example I had an player controlled object (RigidBody) with a custom collision shape (two cylinders with 32 faces each). When this object entered an Area then the CPU usage went up. Even when the area was disabled.

So I would suggest (at least for Godot 2.1.4) that you don't use custom collision shapes for player controlled objects if possible. Instead try to compose it of standard collision shapes (if a single standard collision shape doesn't fit).

Also, physics don't work well with custom collision objects. Godot 2.1.4 doesn't calculate inertia for custom shapes. And refrain from scaling collision shapes. This gave me all kind of strange results. Edit their extents instead.

0 votes

I know the answer come a little late. But the profiler in Godot is quite powerful, and this video will definitely helps you.


enter image description here

answered Jun 5 by ProggerParrot (116 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.