tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [tomcat] branch master updated: Minor optimisation - add new line to access log message outside the sync
Date Sun, 20 Oct 2019 12:42:23 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 10/18/19 12:22, markt@apache.org wrote:
> This is an automated email from the ASF dual-hosted git
> repository.
>
> markt pushed a commit to branch master in repository
> https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/master by this
> push: new b8cc215  Minor optimisation - add new line to access log
> message outside the sync b8cc215 is described below

Doesn't this perform a string-mutation instead of a stream-append?

Or is it more critical to hold the lock for as short a period as possibl
e?

- -chris

> commit b8cc21574938dc8f46b88396de0694e1ce7aa0a7 Author: Mark Thomas
> <markt@apache.org> AuthorDate: Fri Oct 18 17:03:47 2019 +0100
>
> Minor optimisation - add new line to access log message outside the
> sync --- java/org/apache/catalina/valves/AccessLogValve.java | 2
> +- 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/java/org/apache/catalina/valves/AccessLogValve.java
> b/java/org/apache/catalina/valves/AccessLogValve.java index
> fe2943e..b133e10 100644 ---
> a/java/org/apache/catalina/valves/AccessLogValve.java +++
> b/java/org/apache/catalina/valves/AccessLogValve.java @@ -610,10
> +610,10 @@ public class AccessLogValve extends
> AbstractAccessLogValve {
>
> // Log this message try { +
> message.write(System.lineSeparator()); synchronized(this) { if
> (writer != null) { message.writeTo(writer); -
> writer.println(""); if (!buffered) { writer.flush(); }
>
>
> ---------------------------------------------------------------------
>
>
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl2sVi4ACgkQHPApP6U8
pFiMAA/8ChWuK3QDa2mOrHkVNKxexYiWD/yr3D/wex6w0BNpmKia6UzCs+qhFgwh
0jxbvbUzEUP11BJym2iZNOryLSk++ZCsq3s/e3730a0wn3eqaFaiCHH9xk2sogZ0
IWK1apDnGgB23mbQ5b+sshJinSWw6453X1XJUjnZtkv9Z89wac6cnfHs1WSqcqv4
bsxyZexlcs+bH3EUqxBqxlIGYxQS3GWQPFboWls04yCksBXwzGgT8s0CWJ94nfb8
jDA1ru0VIvJCwsqCY6ICqA9fXSByHfaZguXBbJ7rdMRHzrrSmwd/uei+leyN5Ch9
WhrwNZ1NlBmjvqQs2dhtMzZqhwWK7X4VEyg34KK0JI1Sx8LlajKd0VaD0J3Vz/FH
iu2ej/8YMorSIT8l6gVM28Yh8h+Zd+YeVvrZ7MZRZ0iFz+fXqS2EuR3s6oDU+6X+
7DSgkY1KMHi14t21fn5YZpAXe01OUI/tLUlP0OXzFrLzstscxOy3Bg24Ka1qT17N
rzGanNFlZxqtidyDpj+C17l8RACJbm7bBhlAg9+DaiwjkN+BbE0kKkcapjj0u41p
ay5mmX81tGG1qz4WfznD03fSI+H0xnVHdlRG5ewAMOceoKybOiVJjfIRh3mxG2rg
tqMCET6SvV3qaGja5trfRib6RVh/mTxAVdvHVW0YmRP/a1SY6Gw=
=g4kR
-----END PGP SIGNATURE-----

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


Mime
View raw message