Log::Any performances

--94eb2c12298ace18700554451a4f
Content-Type: text/plain; charset="UTF-8"

Hello,

My question is about Log::Any and performances.

When Log::Any was integrated into Bailador, a problem of performances was
found (https://github.com/jsimonet/log-any/issues/1).

Log::Any is a class using the singleton pattern, which have a list of
Log::Any::Pipeline instances as a parameter. These pipelines allows to
define alternatives paths for logs. By default, a "_default" pipeline is
added and used (
https://github.com/jsimonet/log-any/blob/master/lib/Log/Any.pm6#L14).

While testing to find where the time is spent and how I can improve things,
I noted that calling the method Log::Any.add( Log::Any::Pipeline.new,
:overwrite ) (
https://github.com/jsimonet/log-any/blob/master/lib/Log/Any.pm6#L91) in
Bailador::App::before-log() (
https://github.com/Bailador/Bailador/commit/efdc60dc0eb8a04b30dd13dcdd43bb97cee50042)
greatly improve performances.

The problem is this call does not change anything to Log::Any
configuration: the "_default" pipeline is just replaced by a new one which
has the same attributes.

I do not understand where the performance loss is located, if someone could
look and find something, we could remove the hack from Bailador :)

-- 
Julien Simonet

--94eb2c12298ace18700554451a4f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<br><br>My question is about Log::Any and performanc=
es.<br><br>When Log::Any was integrated into Bailador, a problem of perform=
ances was found (<a href=3D"https://github.com/jsimonet/log-any/issues/1">h=
ttps://github.com/jsimonet/log-any/issues/1</a>).<br><br>Log::Any is a clas=
s using the singleton pattern, which have a list of Log::Any::Pipeline inst=
ances as a parameter. These pipelines allows to define alternatives paths f=
or logs. By default, a &quot;_default&quot; pipeline is added and used (<a =
href=3D"https://github.com/jsimonet/log-any/blob/master/lib/Log/Any.pm6#L14=
">https://github.com/jsimonet/log-any/blob/master/lib/Log/Any.pm6#L14</a>).=
<br><br>While testing to find where the time is spent and how I can improve=
 things, I noted that calling the method Log::Any.add( Log::Any::Pipeline.n=
ew, :overwrite ) (<a href=3D"https://github.com/jsimonet/log-any/blob/maste=
r/lib/Log/Any.pm6#L91">https://github.com/jsimonet/log-any/blob/master/lib/=
Log/Any.pm6#L91</a>) in Bailador::App::before-log() (<a href=3D"https://git=
hub.com/Bailador/Bailador/commit/efdc60dc0eb8a04b30dd13dcdd43bb97cee50042">=
https://github.com/Bailador/Bailador/commit/efdc60dc0eb8a04b30dd13dcdd43bb9=
7cee50042</a>) greatly improve performances.<br><br>The problem is this cal=
l does not change anything to Log::Any configuration: the &quot;_default&qu=
ot; pipeline is just replaced by a new one which has the same attributes.<b=
r><br>I do not understand where the performance loss is located, if someone=
 could look and find something, we could remove the hack from Bailador :)<b=
r><br>-- <br>Julien Simonet<br>
</div>

--94eb2c12298ace18700554451a4f--
0
kernel
7/14/2017 11:11:02 AM
perl.perl6.users 843 articles. 0 followers. Follow

0 Replies
22 Views

Similar Articles

[PageSpeed] 45

Reply: