diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index bc23d8ba..79d8afdf 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1445,9 +1445,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) alignas(64) std::atomic state = Available; }; +#ifdef __EMSCRIPTEN__ + const int jobs = 1; +#else // Leave one thread for file reader, second thread for dispatch (this thread) // Minimum 2 threads to have at least two buffers (one in use, second one filling up) const auto jobs = std::max( std::thread::hardware_concurrency() - 2, 2 ); +#endif auto td = std::make_unique( jobs ); auto data = std::make_unique( jobs );