🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.2 KiB

  1. # Frequently Asked Questions
  2. <!--
  3. @cond TURN_OFF_DOXYGEN
  4. -->
  5. # Table of Contents
  6. * [Introduction](#introduction)
  7. * [FAQ](#faq)
  8. * [Why is my debug build on Windows so slow?](#why-is-my-debug-build-on-windows-so-slow)
  9. <!--
  10. @endcond TURN_OFF_DOXYGEN
  11. -->
  12. # Introduction
  13. This is a constantly updated section where I'll try to put the answers to the
  14. most frequently asked questions.<br/>
  15. If you don't find your answer here, there are two cases: nobody has done it yet
  16. or this section needs updating. In both cases, try to
  17. [open a new issue](https://github.com/skypjack/entt/issues/new) or enter the
  18. [gitter channel](https://gitter.im/skypjack/entt) and ask your question.
  19. Probably someone already has an answer for you and we can then integrate this
  20. part of the documentation.
  21. # FAQ
  22. ## Why is my debug build on Windows so slow?
  23. `EnTT` is an experimental project that I also use to keep me up-to-date with the
  24. latest revision of the language and the standard library. For this reason, it's
  25. likely that some classes you're working with are using standard containers under
  26. the hood.<br/>
  27. Unfortunately, it's known that the standard containers aren't particularly
  28. performing in debugging (the reasons for this go beyond this document) and are
  29. even less so on Windows apparently. Fortunately this can also be mitigated a
  30. lot, achieving good results in many cases.
  31. First of all, there are two things to do in a Windows project:
  32. * Disable the [`/JMC`](https://docs.microsoft.com/cpp/build/reference/jmc)
  33. option (_Just My Code_ debugging), available starting in Visual Studio 2017
  34. version 15.8.
  35. * Set the [`_ITERATOR_DEBUG_LEVEL`](https://docs.microsoft.com/cpp/standard-library/iterator-debug-level)
  36. macro to 0. This will disable checked iterators and iterator debugging.
  37. Moreover, the macro `ENTT_DISABLE_ASSERT` should be defined to disable internal
  38. checks made by `EnTT` in debug. These are asserts introduced to help the users,
  39. but require to access to the underlying containers and therefore risk ruining
  40. the performance in some cases.
  41. With these changes, debug performance should increase enough for most cases. If
  42. you want something more, you can can also switch to an optimization level `O0`
  43. or preferably `O1`.