index.rst 2.4 KB

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