mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54:35 +00:00
Just one compression worker thread on emscripten.
This commit is contained in:
parent
d33c7e5508
commit
dff45f1dc1
@ -1445,9 +1445,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
alignas(64) std::atomic<State> state = Available;
|
alignas(64) std::atomic<State> state = Available;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
const int jobs = 1;
|
||||||
|
#else
|
||||||
// Leave one thread for file reader, second thread for dispatch (this thread)
|
// 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)
|
// Minimum 2 threads to have at least two buffers (one in use, second one filling up)
|
||||||
const auto jobs = std::max<int>( std::thread::hardware_concurrency() - 2, 2 );
|
const auto jobs = std::max<int>( std::thread::hardware_concurrency() - 2, 2 );
|
||||||
|
#endif
|
||||||
auto td = std::make_unique<TaskDispatch>( jobs );
|
auto td = std::make_unique<TaskDispatch>( jobs );
|
||||||
auto data = std::make_unique<JobData[]>( jobs );
|
auto data = std::make_unique<JobData[]>( jobs );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user