Use more cores for image decoding and reserve 4 for other important things (main thread, renderg, mesh repo, LFS); bring back FSImageDecodeThreads debug setting
parent
a92c36a8a6
commit
35de2e2a2f
|
|
@ -26540,6 +26540,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSImageDecodeThreads</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount of threads to use for image decoding. 0 = auto, >= 1 number of threads. Needs restart</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSPerfFloaterSmoothingPeriods</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -2571,8 +2571,15 @@ bool LLAppViewer::initThreads()
|
|||
// The only configurable thread count right now is ImageDecode
|
||||
// The viewer typically starts around 8 threads not including image decode,
|
||||
// so try to leave at least one core free
|
||||
S32 image_decode_count = llclamp(cores - 9, 1, 8);
|
||||
threadCounts["ImageDecode"] = image_decode_count;
|
||||
// <FS:Ansariel> Override image decode thread config
|
||||
//S32 image_decode_count = llclamp(cores - 9, 1, 8);
|
||||
S32 image_decode_count = llclamp(cores - 4, 1, 8);
|
||||
if (auto max_decodes = gSavedSettings.getU32("FSImageDecodeThreads"); max_decodes > 0)
|
||||
{
|
||||
image_decode_count = llclamp((S32)max_decodes, 1, 32);
|
||||
}
|
||||
// <FS:Ansariel>
|
||||
threadCounts["ImageDecode"] = image_decode_count;
|
||||
gSavedSettings.setLLSD("ThreadPoolSizes", threadCounts);
|
||||
|
||||
// Image decoding
|
||||
|
|
|
|||
Loading…
Reference in New Issue