index.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. :allow_comments: False
  2. .. _doc_performance:
  3. Performance
  4. ===========
  5. Introduction
  6. ------------
  7. Godot follows a balanced performance philosophy. In the performance world,
  8. there are always tradeoffs, which consist of trading speed for usability
  9. and flexibility. Some practical examples of this are:
  10. - Rendering large amounts of objects efficiently is easy, but when a
  11. large scene must be rendered, it can become inefficient. To solve this,
  12. visibility computation must be added to the rendering. This makes rendering
  13. less efficient, but at the same time, fewer objects are rendered. Therefore,
  14. the overall rendering efficiency is improved.
  15. - Configuring the properties of every material for every object that
  16. needs to be rendered is also slow. To solve this, objects are sorted by
  17. material to reduce the costs. At the same time, sorting has a cost.
  18. - In 3D physics, a similar situation happens. The best algorithms to
  19. handle large amounts of physics objects (such as SAP) are slow at
  20. insertion/removal of objects and raycasting. Algorithms that allow faster
  21. insertion and removal, as well as raycasting, will not be able to handle as
  22. many active objects.
  23. And there are many more examples of this! Game engines strive to be
  24. general-purpose in nature. Balanced algorithms are always favored over
  25. algorithms that might be fast in some situations and slow in others, or
  26. algorithms that are fast but are more difficult to use.
  27. Godot is not an exception to this. While it is designed to have backends
  28. swappable for different algorithms, the default backends prioritize balance and
  29. flexibility over performance.
  30. With this clear, the aim of this tutorial section is to explain how to get the
  31. maximum performance out of Godot. While the tutorials can be read in any order,
  32. it is a good idea to start from :ref:`doc_general_optimization`.
  33. Common
  34. ------
  35. .. toctree::
  36. :maxdepth: 1
  37. :name: toc-learn-features-general-optimization
  38. general_optimization
  39. using_servers
  40. CPU
  41. ---
  42. .. toctree::
  43. :maxdepth: 1
  44. :name: toc-learn-features-cpu-optimization
  45. cpu_optimization
  46. GPU
  47. ---
  48. .. toctree::
  49. :maxdepth: 1
  50. :name: toc-learn-features-gpu-optimization
  51. gpu_optimization
  52. using_multimesh
  53. pipeline_compilations
  54. 3D
  55. --
  56. .. toctree::
  57. :maxdepth: 1
  58. :name: toc-learn-features-3d-optimization
  59. optimizing_3d_performance
  60. vertex_animation/index
  61. Threads
  62. -------
  63. .. toctree::
  64. :maxdepth: 1
  65. :name: toc-learn-features-threads
  66. using_multiple_threads
  67. thread_safe_apis