Reduce number of worker threads used for render tasks.

Number of cores -> number of worker threads:

1 -> 0
2 -> 0
3 -> 0
4 -> 1
5 -> 1
6 -> 2
7 -> 2
8 -> 3
9 -> 3
10 -> 4
11 -> 4
12 -> 5
13 -> 5
14 -> 6
15 -> 6
16 -> 7
17 -> 7
18 -> 8
19 -> 8
20 -> 9
21 -> 9
22 -> 10
23 -> 10
24 -> 11
25 -> 11
26 -> 12
27 -> 12
28 -> 13
29 -> 13
30 -> 14
31 -> 14
32 -> 15
This commit is contained in:
Bartosz Taudul 2023-08-05 12:01:36 +02:00
parent 47b724a903
commit 296f30a9c5
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -20,7 +20,7 @@ TimelineController::TimelineController( View& view, Worker& worker, bool threadi
#ifdef __EMSCRIPTEN__
, m_td( 0, "Render" )
#else
, m_td( threading ? (size_t)std::max( 0, (int)std::thread::hardware_concurrency() - 2 ) : 0, "Render" )
, m_td( threading ? (size_t)std::max( 0, ( (int)std::thread::hardware_concurrency() - 2 ) / 2 ) : 0, "Render" )
#endif
{
}