Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.92k stars 550 forks source link

[PATCH] dont test for bootstrap file twice in XSLoader #14307

Closed p5pRT closed 9 years ago

p5pRT commented 9 years ago

Migrated from rt.perl.org#123373 (status was 'resolved')

Searchable as RT123373$

p5pRT commented 9 years ago

From @bulk88

Created by @bulk88

Need number.

Perl Info ``` Flags: category=core severity=low Site configuration information for perl 5.21.7: Configured by Owner at Sat Nov 22 21:54:54 2014. Summary of my perl5 (revision 5 version 21 subversion 7) configuration: Local Commit: 1bce52df028aabe28c20b2d97949e35c17ea811e Ancestor: 7072da8afeba4c87ae623cd913e274396ffcf1cd Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -G7 -GL -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME -DNO_MATHOMS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T', optimize='-O1 -MD -Zi -DNDEBUG -G7 -GL', cppflags='-DWIN32' ccversion='13.10.6030', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, longdblkind=0 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl521\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl521.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl521\lib\CORE" -machine:x86' Locally applied patches: ce7a4d57d0acca9f39a84d36d708c4505dfe45ca ca0b263f4b167ddf97416f657d79ab5bd3344357 08919bf863666074243240abbd19cd1a74cc7b74 b8a043377dbf39548709b107a11e5cc2714c0e9a efa855eb5cffb7739616c295dd968d1510efeeb0 1d47d0b810e26d9a2f9101fb813bd5b3dd332cc9 3faca062ddb056db54f73fa55b0a9d473675dd33 0b3e905bda3e75ad948a1213f620656b60807393 1b1efc719fde05d215e5a13fb38c03e12a3aab08 1bce52df028aabe28c20b2d97949e35c17ea811e @INC for perl 5.21.7: ..\lib C:/perl521/srcnewb4opt/lib . Environment for perl 5.21.7: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\WINDOWS\system32;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\WINDOWS;C:\Program Files\Git\cmd;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;C:\perl\bin PERL_BADLANG (unset) PERL_JSON_BACKEND=Cpanel::JSON::XS PERL_YAML_BACKEND=YAML SHELL (unset) ```
p5pRT commented 9 years ago

From @bulk88

On Fri Dec 05 17​:17​:36 2014\, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com\, generated with the help of perlbug 1.40 running under perl 5.21.7.

----------------------------------------------------------------- [Please describe your issue here]

Need number.

See attached patch and i also attached a csv from procmon of the IO calls.

2 ways on computing the time based on end time.

start is "7​:01​:22.4984221 PM"\,"perl.exe"\,"4852"\,"CreateFile"\,"C​:\p521\srcnew\lib\auto\threads\threads.bs"\,"NAME NOT FOUND"\,"Desired Access​: Read Attributes\, Synchronize\, Disposition​: Open\, Options​: Synchronous IO Non-Alert\, Non-Directory File\, Attributes​: n/a\, ShareMode​: None\, AllocationSize​: n/a"

0.5047662-0.4984221=6.3 ms 0.5079987-0.4984221=9.5 ms

Not bad.

-- bulk88 ~ bulk88 at hotmail.com

p5pRT commented 9 years ago

From @bulk88

0001-dont-test-for-bootstrap-file-twice-in-XSLoader.patch ```diff From 3a28716c57e8b57c831160a0ec151b83d7edaa7f Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Fri, 5 Dec 2014 20:23:06 -0500 Subject: [PATCH] dont test for bootstrap file twice in XSLoader This saves ~8ms on my mech HD Win64 system per load() call. See [perl #123373] for details. --- dist/XSLoader/XSLoader_pm.PL | 5 +++-- pod/perldelta.pod | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL index 578bd99..414eaf2 100644 --- a/dist/XSLoader/XSLoader_pm.PL +++ b/dist/XSLoader/XSLoader_pm.PL @@ -10,7 +10,7 @@ print OUT <<'EOT'; package XSLoader; -$VERSION = "0.19"; +$VERSION = "0.20"; #use strict; @@ -109,9 +109,10 @@ print OUT <<'EOT'; # print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug; eval { do $bs; }; warn "$bs: $@\n" if $@; + goto \&XSLoader::bootstrap_inherit; } - goto \&XSLoader::bootstrap_inherit if not -f $file or -s $bs; + goto \&XSLoader::bootstrap_inherit if not -f $file; my $bootname = "boot_$module"; $bootname =~ s/\W/_/g; diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 2446bb9..5c6922a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -144,6 +144,12 @@ Don't turn leading C into C on Cygwin. [perl #122635] L has been upgraded from version 1.25 to 1.26. +=item * + +L has been upgraded from version 0.19 to 0.20 + +Don't test twice for bootstrap file. + =back =head2 Removed Modules and Pragmata -- 1.8.0.msysgit.0 ```
p5pRT commented 9 years ago

From @bulk88

perlbootstraptiming.CSV

p5pRT commented 9 years ago

From @cpansprout

On Fri Dec 05 17​:28​:54 2014\, bulk88 wrote​:

On Fri Dec 05 17​:17​:36 2014\, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com\, generated with the help of perlbug 1.40 running under perl 5.21.7.

----------------------------------------------------------------- [Please describe your issue here]

Need number.

See attached patch and i also attached a csv from procmon of the IO calls.

2 ways on computing the time based on end time.

start is "7​:01​:22.4984221 PM"\,"perl.exe"\,"4852"\,"CreateFile"\,"C​:\p521\srcnew\lib\auto\threads\threads.bs"\,"NAME NOT FOUND"\,"Desired Access​: Read Attributes\, Synchronize\, Disposition​: Open\, Options​: Synchronous IO Non-Alert\, Non-Directory File\, Attributes​: n/a\, ShareMode​: None\, AllocationSize​: n/a"

0.5047662-0.4984221=6.3 ms 0.5079987-0.4984221=9.5 ms

Not bad.

Thank you. Applied as 4c7a0d983b3.

--

Father Chrysostomos

p5pRT commented 9 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 9 years ago

@cpansprout - Status changed from 'open' to 'resolved'