index.rst 2.3 KB

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