index.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Optimization
  2. =============
  3. Introduction
  4. ------------
  5. Godot follows a balanced performance philosophy. In the performance world, there
  6. are always trade-offs, which consist of trading speed for usability and
  7. flexibility. Some practical examples of this are:
  8. - Rendering objects efficiently in high amounts 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, which makes rendering
  11. less efficient, but, at the same time, fewer objects are rendered, so
  12. efficiency overall improves.
  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, but 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 ray-casting. Algorithms that allow faster
  19. insertion and removal, as well as ray-casting, 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 general
  22. purpose in nature, so balanced algorithms are always favored over algorithms
  23. that might be fast in some situations and slow in others or algorithms that are
  24. fast but make usability more difficult.
  25. Godot is not an exception and, while it is designed to have backends swappable
  26. for different algorithms, the default ones prioritize balance and flexibility
  27. 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