tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r830589 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
Date Thu, 29 Oct 2009 14:23:27 GMT
On 10/28/2009 10:54 PM, Konstantin Kolinko wrote:
> 2009/10/28<markt@apache.org>:
>    
>> Author: markt
>> Date: Wed Oct 28 15:30:49 2009
>> New Revision: 830589
>>
>>
>> +        if (endpoint.getCurrentThreadsBusy()>0&&
>> +                endpoint.getMaxThreads()>0) {
>> +            threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
>> +                    / endpoint.getMaxThreads();
>> +        }
>>      
> I think that endpoint.getCurrentThreadsBusy() call is not cheap
in trunk, this is cheap if they are using the executor that comes with 
Tomcat. It's a read from a volatile variable.

>   (and
> can provide different results between calls). It would be better to
> cache its result in a local variable.
>    
in trunk, this call will go away in the processor, as the processor no 
longer needs to control this.

> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message