mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
This allows users to leave comments on pages that don't have `:allow_comments: False` somewhere in the page's source. Both manual and class reference pages can receive comments. Index pages cannot have comments, as discussion should occur on "leaf" pages. GitHub Discussions is used as a backend on the same repository. This means that Discussions *must* be enabled on godotengine/godot-docs before this commit is merged to `master`. Users can choose to use the "Custom" watch mode if they don't want to get notifications for discussion updates, but still get notifications for issue and pull request updates. User comments are intended to be used for the following purposes: - Add a clarification or correct something in the documentation, without having to open a pull request. Contributors are encouraged to take a look at discussions from time to time, and see if there's information worth incorporating in the pages themselves. Don't forget to reply to the comment when doing so :) - Mention a workaround for a common issue. - Link to useful third-party resources that are relevant to the current page, such as tutorials or add-ons. User comments should *not* be used for technical support. Other community platforms should be used for that. Page-to-discussion matching is done using the `pagename` Sphinx variable, which is independent of the Godot version and documentation language. Being independent of the Godot version allows keeping old comments when the Godot version changes, while also allowing users from `/stable` and `/4.1` to "see" each other in discussions. See https://giscus.app for more information.
93 lines
2.4 KiB
ReStructuredText
93 lines
2.4 KiB
ReStructuredText
:allow_comments: False
|
|
|
|
.. _doc_performance:
|
|
|
|
Performance
|
|
===========
|
|
|
|
Introduction
|
|
------------
|
|
|
|
Godot follows a balanced performance philosophy. In the performance world,
|
|
there are always tradeoffs, which consist of trading speed for usability
|
|
and flexibility. Some practical examples of this are:
|
|
|
|
- Rendering large amounts of objects efficiently is easy, but when a
|
|
large scene must be rendered, it can become inefficient. To solve this,
|
|
visibility computation must be added to the rendering. This makes rendering
|
|
less efficient, but at the same time, fewer objects are rendered. Therefore,
|
|
the overall rendering efficiency is improved.
|
|
|
|
- Configuring the properties of every material for every object that
|
|
needs to be rendered is also slow. To solve this, objects are sorted by
|
|
material to reduce the costs. At the same time, sorting has a cost.
|
|
|
|
- In 3D physics, a similar situation happens. The best algorithms to
|
|
handle large amounts of physics objects (such as SAP) are slow at
|
|
insertion/removal of objects and raycasting. Algorithms that allow faster
|
|
insertion and removal, as well as raycasting, will not be able to handle as
|
|
many active objects.
|
|
|
|
And there are many more examples of this! Game engines strive to be
|
|
general-purpose in nature. Balanced algorithms are always favored over
|
|
algorithms that might be fast in some situations and slow in others, or
|
|
algorithms that are fast but are more difficult to use.
|
|
|
|
Godot is not an exception to this. While it is designed to have backends
|
|
swappable for different algorithms, the default backends prioritize balance and
|
|
flexibility over performance.
|
|
|
|
With this clear, the aim of this tutorial section is to explain how to get the
|
|
maximum performance out of Godot. While the tutorials can be read in any order,
|
|
it is a good idea to start from :ref:`doc_general_optimization`.
|
|
|
|
Common
|
|
------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-features-general-optimization
|
|
|
|
general_optimization
|
|
using_servers
|
|
|
|
CPU
|
|
---
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-features-cpu-optimization
|
|
|
|
cpu_optimization
|
|
|
|
GPU
|
|
---
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-features-gpu-optimization
|
|
|
|
gpu_optimization
|
|
using_multimesh
|
|
|
|
3D
|
|
--
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-features-3d-optimization
|
|
|
|
optimizing_3d_performance
|
|
vertex_animation/index
|
|
|
|
|
|
Threads
|
|
-------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-features-threads
|
|
|
|
using_multiple_threads
|
|
thread_safe_apis
|