[sldev] Run multiple threads menu option

Callum Lerwick seg at haxxed.com
Sun Mar 18 14:32:45 PDT 2007


On Sun, 2007-03-18 at 20:23 +0100, Dale Glass wrote:
> В сообщении от 18 марта 2007 20:08 David Fries написал(a):
> > The menu option 'Run multiple threads', doesn't make any difference
> > from what I can tell.  The jpeg2000 decoding is running in a
> > separate thread if it is checked or if it isn't.  I thought an
> > earlier first look client might have been doing jpeg2000 in
> > multiple threads rather than the one I'm currently seeing, but I
> > wasn't looking for it at the time.
> 
> Well, that made me curious to see what the heck that option does, so 
> here you go. Only usage of it seems to be in viewer.cpp, 
> line 1830:
> 
> const F64 max_idle_time = run_multiple_threads ? 
> min_idle_time : .005; // 5 ms
> 
> around line 1880:
> 
> 				 // Prevent the worker threads from running while rendering.
> 				// if (LLThread::processorCount()==1) //pause() should only be 
> required when on a single processor client...
> 				if (run_multiple_threads == FALSE)
> 				{
> 					gTextureCache->pause();
> 					gImageDecodeThread->pause();
> 					// gTextureFetch->pause(); // Don't pause the fetch (IO) thread
> 				}

Interesting what they commented out. Pausing the other threads on a
single CPU system will in theory reduce cache thrashing and context
switches, improving overall performance. Maybe its a manual switch for
now for performance profiling. The name seems a bit misleading...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070318/87c5633d/attachment.pgp


More information about the SLDev mailing list