develooper Front page | perl.perl5.porters | Postings from January 2014

[perl #121119] [PATCH] speed up miniperl @INC searching, buildcustomize

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
January 30, 2014 08:13
Subject:
[perl #121119] [PATCH] speed up miniperl @INC searching, buildcustomize
Message ID:
rt-4.0.18-8884-1391069596-1770.121119-15-0@perl.org
On Thu Jan 30 00:01:05 2014, bulk88 wrote:
> This is a bug report for perl from bulk88@hotmail.com,
> generated with the help of perlbug 1.39 running under perl 5.19.7.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> See attached patch. Each dir being searched that fails on Win32
> results
> in 10 I/O sys calls which I counted at 17 ms wall time, times 16 build
> customize dirs that didn't match is an extra 272 ms of wall time
> dealing
> with the not found dirs during an @INC search. Also as the build
> progresses, more and more things will be found on the 1st try in /lib,
> and I presume buildcustomize dirs become totally unused once XS module
> start being built since everything needed for XS building (which is a
> PP
> process) will be in /lib and found on 1st try.
> 
> regular build
> -----------------------------------------------------------------
> if exist ..\x2p\a2p.exe.manifest mt -nologo -manifest
> ..\x2p\a2p.exe.man
> ifest -outputresource:..\x2p\a2p.exe;1 &&  if exist
> ..\x2p\a2p.exe.manifest del
> ..\x2p\a2p.exe.manifest
> Everything is up to date. 'nmake test' to run test suite.
> timethis 1: 1656 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
>    (warning: too few iterations for a reliable count)
> 
> C:\p519\src\win32>perl -MBenchmark -e" timethis(1,
> 'system(\'nmake\')')"
> -----------------------------------------------------------------
> build with this patch
> -----------------------------------------------------------------
> if exist ..\x2p\a2p.exe.manifest mt -nologo -manifest
> ..\x2p\a2p.exe.man
> ifest -outputresource:..\x2p\a2p.exe;1 &&  if exist
> ..\x2p\a2p.exe.manifest del
> ..\x2p\a2p.exe.manifest
> Everything is up to date. 'nmake test' to run test suite.
> timethis 1: 1137 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
>    (warning: too few iterations for a reliable count)
> 
> C:\p519\srcnew\win32>perl -MBenchmark -e" timethis(1,
> 'system(\'nmake\')')"
> -----------------------------------------------------------------
> 
> (1656 - 1137) / 60 = 8.65 mins
> 
> (the following number is a flaky statistic)
> (1656 - 1137) / .272 ms= 1908.08824 runs of miniperl???
> 
> I've attached a procmon log of miniperl uselessly searching a large
> num
> of @INC dirs every time a use/require is done. The log is of the
> "before".
> 
> I left the original comment in place for historical reasons. The
> comment
> might be from something that happened in a Module::Build module back
> when M::B was in core.
> 
> [Please do not change anything below this line]
> -----------------------------------------------------------------
> ---
> Flags:
>            category=core
>            severity=low
> ---
> Site configuration information for perl 5.19.7:
> 
> Configured by Owner at Thu Nov 28 02:32:44 2013.
> 
> Summary of my perl5 (revision 5 version 19 subversion 7)
> configuration:
>          Derived from: 8f47723e28b75530b743941cdd8b07f849ec48e2
>          Ancestor: 1061065f7a09399eefb50e9a035502621722bcc0
>          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
>            useperlio=define, d_sfio=undef, uselargefiles=define,
> usesocks=undef
>            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 -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
>            d_longlong=undef, longlongsize=8, d_longdbl=define,
> longdblsize=8
>            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:\perl519\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=perl519.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:\perl519\lib\CORE"  -machine:x86'
> 
> Locally applied patches:
>            uncommitted-changes
>            8f47723e28b75530b743941cdd8b07f849ec48e2
> 
> ---
> @INC for perl 5.19.7:
>            C:/perl519/site/lib
>            C:/perl519/lib
>            .
> 
> ---
> Environment for perl 5.19.7:
>            HOME (unset)
>            LANG (unset)
>            LANGUAGE (unset)
>            LD_LIBRARY_PATH (unset)
>            LOGDIR (unset)
>            PATH=C:\perl519\bin;C:\Program Files\Microsoft Visual
> Studio .NET
> 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET
> 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET
> 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET
> 2003\Common7\Tools\bin\prerelease;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;
>            PERL_BADLANG (unset)
>            SHELL (unset)

This was rejected from the P5P ML due to attachment size (250KB limit IIRC). Bumping.


-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=121119

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About