Your message dated Thu, 05 Jan 2017 06:03:23 +0000
with message-id <[email protected]>
and subject line Bug#849843: fixed in libyaml-libyaml-perl 0.63-2
has caused the Debian Bug report #849843,
regarding libyaml-libyaml-perl: [PATCH] lazy load B::Deparse for big speedup
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
849843: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849843
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libyaml-libyaml-perl
Version: 0.63-1
Severity: normal
Tags: patch upstream

This speeds up startup time dramatically and is noticeable with
small scripts on my weak hardware where loading B::Deparse takes
a significant amount of time.  Lazy loading it helps for the
common case when I do not need to dump a coderef.

"require" is idempotent in Perl, so it has virtually no overhead
across repeated invocations of coderef2text.

With this patch, the following script runs in around 30ms
without any args passed; and around 150ms with "code" as the
first arg.  Without the patch, it takes around 150ms regardless.

-----------8<-----------
use YAML::XS qw(Dump);
my $h = { a => 'b', c => 'd' };
warn Dump($h);
if (shift eq 'code') {
        warn $YAML::XS::coderef2text->(sub { print "Hi\n" });
}
-----------8<-----------

Note: I realize upstream has a git repository and bug tracker;
but I will not use that as that requires registering on a site
which is non-Free Software, requires non-Free JavaScript (which
I wouldn't run regardless given my slow hardware) and has an
unacceptable terms-of-service.  So, thank you to Debian
for continuing to host an open-to-all bug tracker :)
>From 8c51950fa3796346542ca01ee04659edaaf81cc3 Mon Sep 17 00:00:00 2001
From: Eric Wong <[email protected]>
Date: Sun, 1 Jan 2017 08:05:59 +0000
Subject: [PATCH] load B::Deparse lazily

This speeds up startup time dramatically and is noticeable with
small scripts on my weak hardware where loading B::Deparse takes
a significant amount of time.  Lazy loading it helps for the
common case when I do not need to dump a coderef.

"require" is idempotent in Perl, so it has virtually no overhead
across repeated invocations of coderef2text.

With this patch, the following script runs in around 30ms
without any args passed; and around 150ms with "code" as the
first arg.  Without the patch, it takes around 150ms regardless.

-----------8<-----------
use YAML::XS qw(Dump);
my $h = { a => 'b', c => 'd' };
warn Dump($h);
if (shift eq 'code') {
	warn $YAML::XS::coderef2text->(sub { print "Hi\n" });
}
-----------8<-----------
---
 lib/YAML/XS.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/YAML/XS.pm b/lib/YAML/XS.pm
index 90253c8..0fd2df4 100644
--- a/lib/YAML/XS.pm
+++ b/lib/YAML/XS.pm
@@ -50,15 +50,11 @@ sub LoadFile {
     return YAML::XS::LibYAML::Load(do { local $/; local $_ = <$IN> });
 }
 
-# XXX Figure out how to lazily load this module.
-# So far I've tried using the C function:
-#      load_module(PERL_LOADMOD_NOIMPORT, newSVpv("B::Deparse", 0), NULL);
-# But it didn't seem to work.
-use B::Deparse;
 
 # XXX The following code should be moved from Perl to C.
 $YAML::XS::coderef2text = sub {
     my $coderef = shift;
+    require B::Deparse;
     my $deparse = B::Deparse->new();
     my $text;
     eval {
-- 
EW


--- End Message ---
--- Begin Message ---
Source: libyaml-libyaml-perl
Source-Version: 0.63-2

We believe that the bug you reported is fixed in the latest version of
libyaml-libyaml-perl, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <[email protected]> (supplier of updated 
libyaml-libyaml-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 05 Jan 2017 06:42:48 +0100
Source: libyaml-libyaml-perl
Binary: libyaml-libyaml-perl
Architecture: source
Version: 0.63-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <[email protected]>
Changed-By: Salvatore Bonaccorso <[email protected]>
Closes: 849843
Description: 
 libyaml-libyaml-perl - Perl interface to libyaml, a YAML implementation
Changes:
 libyaml-libyaml-perl (0.63-2) unstable; urgency=medium
 .
   * Team upload.
   * Load B::Deparse at runtime.
     Thanks to Eric Wong <[email protected]> for the report (Closes: #849843)
Checksums-Sha1: 
 8cf4786227fb76fdb3cab0627612264995fab730 2313 libyaml-libyaml-perl_0.63-2.dsc
 2dfdb917733f973ec842350f68fe2a163f20c7dc 6036 
libyaml-libyaml-perl_0.63-2.debian.tar.xz
Checksums-Sha256: 
 42274f464756803822ba679cf68bc36253b312e96ecd0f4b3901e856e3c2c232 2313 
libyaml-libyaml-perl_0.63-2.dsc
 a4a42d278480d689fd43992d9f8e96b3a08681cbbe02c3786b09842e3cdc3c79 6036 
libyaml-libyaml-perl_0.63-2.debian.tar.xz
Files: 
 efd7f3e87530d286b4c68a23eae25819 2313 perl optional 
libyaml-libyaml-perl_0.63-2.dsc
 533c571094f61998f70443b13dbb1b22 6036 perl optional 
libyaml-libyaml-perl_0.63-2.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAlht3y5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89EwpoP/ifQ+J6tpbaWkcgihcpETemF6x4DO0mP
eyK4XPBdXOxgcD61FL0DnOvYlTbWHaPqPUwVsYC0MS0jQRD6CMabg2mvKb326JQ2
1KpxqZtrAnqnyosVM1ruFVl4JTSPdHZ3LcSat5BieEgDoms/Z7SkrrnATSr7Kj4K
Vs2VdYVGX3XhF0Fk+BsSkGAe72CojDyUhfBan12o5qKhZzJtIgDktB/yAemRi+QE
51lyl+2hhVwZFQidEReHmCnwqEOq5Aji+e0FBDEyxF86dEipuH2Rl01K3rekTzMa
1i21MocF1sTI3LgFo/bL7O9sI3ZUbTmpMT7CTfghRXO6oLgzV8al3ZPKFyzkawGB
S2Rwo4+BgcpD6fS7gdM0ZKX0fKCBGpm5m4s41YqUZ+0DnU8nvu98LX2a9/FfNxSu
BfY784B22R1vqo4fpwGQtOe39w9tOOGMbkfwO1604dqfySHJ4R+jLi+Liy55AQMt
ga1HD5YIIo/u6HWk36DbPphNIum6JLREXNip2vsrZsxnNq8UY9Hfi0i2UES+pjcE
E+ZjP3vON9nI1Ubv5jybnVo5E6aR8/re0n/V3Y3toBQXhGfYdkT4Oige0rlimUOV
LXLtNDCCvmYcwsWjRdDVEwQoW43nqcSfaFVKMxwh8ysNNs7fTN5O8kSkPw1h+Mgq
QilXM2QxaFof
=A5k0
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to