From 4fd262d0b844c82f5a797f2bcfcd573a09b6f16c Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 6 Oct 2019 16:23:45 +1000 Subject: [PATCH] FixedSizeQueue: Work around GCC generating large amounts of debug info --- Source/Core/Common/FixedSizeQueue.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/FixedSizeQueue.h b/Source/Core/Common/FixedSizeQueue.h index 149ee9846b..889cbe2ee7 100644 --- a/Source/Core/Common/FixedSizeQueue.h +++ b/Source/Core/Common/FixedSizeQueue.h @@ -21,7 +21,13 @@ public: void clear() { if constexpr (!std::is_trivial_v) - storage = {}; + { + // The clear of non-trivial objects previously used "storage = {}". However, this causes GCC + // to take a very long time to compile the file/function, as well as generating huge amounts + // of debug information (~2GB object file, ~600MB of debug info). + while (count > 0) + pop(); + } head = 0; tail = 0;