Closed p5pRT closed 8 years ago
..\miniperl.exe -I..\lib ..\make_ext.pl "MAKE=dmake" --dir=..\cpan --dir=..\dist --dir=..\ext --dynamic !Unicode/Normalize
before
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 0:21 am\, Thursday\, November 19 2015 Elapsed Time: 0:05:13.765 Process Time: 0:00:00.546 System Calls: 5903009 Context Switches: 1995063 Page Faults: 4406610 Bytes Read: 921666627 Bytes Written: 142523970 Bytes Other: 15734093
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 0:43 am\, Thursday\, November 19 2015 Elapsed Time: 0:05:13.062 Process Time: 0:00:00.625 System Calls: 8432811 Context Switches: 1964390 Page Faults: 4419335 Bytes Read: 1020883832 Bytes Written: 173697641 Bytes Other: 15747131
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 0:53 am\, Thursday\, November 19 2015 Elapsed Time: 0:05:13.109 Process Time: 0:00:00.515 System Calls: 5841235 Context Switches: 1956027 Page Faults: 4401914 Bytes Read: 918941172 Bytes Written: 142660117 Bytes Other: 15644366
after
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 1:00 am\, Thursday\, November 19 2015 Elapsed Time: 0:04:59.843 Process Time: 0:00:06.812 System Calls: 5727887 Context Switches: 1921204 Page Faults: 4301906 Bytes Read: 883224462 Bytes Written: 142651901 Bytes Other: 15350562
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 1:17 am\, Thursday\, November 19 2015 Elapsed Time: 0:05:01.046 Process Time: 0:00:06.593 System Calls: 6557325 Context Switches: 2065488 Page Faults: 4430735 Bytes Read: 883425807 Bytes Written: 143529569 Bytes Other: 15375963
Version Number: Windows NT 5.2 (Build 3790) Exit Time: 1:43 am\, Thursday\, November 19 2015 Elapsed Time: 0:05:00.750 Process Time: 0:00:06.625 System Calls: 9391458 Context Switches: 2107444 Page Faults: 4335664 Bytes Read: 998322960 Bytes Written: 194058504 Bytes Other: 15480682
notice make_ext.pl's CPU time increased from 0.5 sec to 6.75 sec\, since work was shifted from other processes underneath make_ext.pl to make_ext.pl\, but total wall time decreased by 13 seconds. Many perl process launches\, and parsing/compiling of the whole EUMM software stack were saved. I decided on using an END block instead of overriding CORE::GLOBAL::exit for conservativeness reasons/maybe perf reasons (write to closure lexicals\, instead of write to sub lexicals AND hash keys). This commit causes large whitespace changes due to the new inter-sub scope created. IDK any way around that\, other than to use a object that represents a makefile to remove (the dir\, the makefile's name)\, which the execution would be bless->do 'Makefile.PL'->disarm object with meth call (overkill for a class whose only meth is DESTROY) or directly going inside it->automatic DESTROY (if not explicitly disarmed earlier\, it deletes the makefile).
The before and after %INC module list of make_ext.pl process\, does not change at all with this patch. NOT AT ALL!
..\lib/buildcustomize.pl Carp.pm Config.pm Config_git.pl Config_heavy.pl Cwd.pm DirHandle.pm DynaLoader.pm Exporter.pm Exporter/Heavy.pm ExtUtils/Liblist.pm ExtUtils/Liblist/Kid.pm ExtUtils/MM.pm ExtUtils/MM_Any.pm ExtUtils/MM_Unix.pm ExtUtils/MM_Win32.pm ExtUtils/MY.pm ExtUtils/MakeMaker.pm ExtUtils/MakeMaker/Config.pm ExtUtils/MakeMaker/Locale.pm ExtUtils/MakeMaker/version.pm File/Basename.pm File/Path.pm File/Spec.pm File/Spec/Unix.pm File/Spec/Win32.pm FindExt.pm Symbol.pm Win32.pm constant.pm strict.pm vars.pm version.pm version/regex.pm warnings.pm warnings/register.pm
make_ext.pl before this patch\, already loaded all of EUMM into the make_ext.pl for somewhat dubious (IMO) reasons.
How make_ext.pl before\, loaded all of EUMM.
at C:\p523\src\cpan\ExtUtils-MakeMaker\lib/ExtUtils/MakeMaker.pm line 13\, \<$mfh> line 71. require ExtUtils/MakeMaker.pm called at C:\p523\src\cpan\ExtUtils-MakeMaker\lib/ExtUtils/MM_Unix.pm line 14 ExtUtils::MM_Unix::BEGIN() called at C:\p523\src\cpan\ExtUtils-MakeMaker\lib/ExtUtils/MakeMaker.pm line 0 eval {...} called at C:\p523\src\cpan\ExtUtils-MakeMaker\lib/ExtUtils/MakeMaker.pm line 0 require ExtUtils/MM_Unix.pm called at ..\make_ext.pl line 303 main::build_extension("dist/PathTools"\, "C:\\p523\\src\\win32\\..\\miniperl.exe"\, "Cwd"\, "all"\, ARRAY(0x1a238c0)) called at ..\make_ext.pl line 258
make_ext.pl contains
---------------------------------------------------------- if (-f $makefile) { $makefile_no_minus_f = 0; open my $mfh\, $makefile or die "Cannot open $makefile: $!"; while (\<$mfh>) { # Plagiarised from CPAN::Distribution last if /MakeMaker post_initialize section/; next unless /^#\s+VERSION_FROM\s+=>\s+(.+)/; my $vmod = eval $1; my $oldv; while (\<$mfh>) { next unless /^XS_VERSION = (\S+)/; $oldv = $1; last; } last unless defined $oldv; require ExtUtils::MM_Unix;\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< defined (my $newv = parse_version MM $vmod) or last; --------------------------------------------------------
ExtUtils::MM_Unix contains
---------------------------------------------------- use ExtUtils::MakeMaker qw($Verbose neatvalue); ----------------------------------------------------
Now all of EUMM was sucked in. "require ExtUtils::MM_Unix;" was added in http://perl5.git.perl.org/perl.git/commit/baff067e717fe1c071dea706f7425994cc1d4ce9 "[perl #113940] Make make_ext delete Makefiles when version changes" from Sun Jul 29 01:48:27 2012 https://rt-archive.perl.org/perl5/Ticket/Display.html?id=113940 \, I think that that commit is perf robbing and shouldn't have ever been committed\, but oh well. I guess reverting "[perl #113940] Make make_ext delete Makefiles when version changes" is out of the question.
With this change of running the Makefile.PL inside make_ext.pl\, 1 load/compile of the EUMM stack is prevented. Even on 1 module per make_ext.pl usage of make_ext.pl for the unix makefile\, some resources will still be saved since the number of EUMM loads was cut in half instead of cut by 4/$number_of_core_modules_buildable_on_Win32 as on Win32.
Appears to be a duplicate of 126686. Closing.
-- James E Keenan (jkeenan@cpan.org)
The RT System itself - Status changed from 'new' to 'open'
@jkeenan - Status changed from 'open' to 'rejected'
Migrated from rt.perl.org#126687 (status was 'rejected')
Searchable as RT126687$