Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32 parallel testing #52

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

bulk88
Copy link
Contributor

@bulk88 bulk88 commented Apr 24, 2016

QAH branch submitted for review/shipping.

bulk88 added 16 commits April 5, 2016 15:40
With 1 million tests processed, NYTProf shows this sub was called once for
each test processed, but the print block only executed 1600 times. So dont
compute the output method name, and dont fetch the current test number, if
we aren't going to use it.
… behavior between runs"

This partially reverts commit 4d4d3f0.
In "Unknown arguments to TAP::Harness::new" croak, sorting was kept, but
moved into the branch where it is needed.
new() went from 17.2 seconds (/1000000) exclusive time nytprof to 12.2
seconds after this commit.
Also combine subs with identical bodies. On Win32, memory usage sampled
with "perl -MTAP::Parser::Iterator -E"system 'pause'" caused memory usage
to drop from 2,688KB to 2,672KB after this commit for me.

next() dropped from 68us inclusive to 44us with nytprof, for comparison
next_raw is 39us. next() is called once per test so it is hot.
If something is very wrong with the TAP stream, don't silence $@ die
errors.
TAP::Formatter::Console::_output doesn't exist, TAP::Formatter::Console
inherits _output from TAP::Formatter::Base::_output so patch that.
In some cases (future Win32 Parallel testing implementation) the
TAP::Formatter in proverun.t is a TAP::Formatter::File, not a
TAP::Formatter::Console as before.
Increase likelyhood of race conditions or bugs being revealed. Such bugs
being IO APIs start mixing up and loosing track of which IO block came in
on which fd/stream/fileglob/proc. Increasing number of procs is adding
more opportunity for OS scheduler randomness. This patch helped diagnose
and make almost always reproducable a race condition bug I created and
fixed.
This commit breaks on unix. Next commit fixes unix.
Unix.pm is a modified (most changes are deleting things) pre-Win32-Async
Process.pm
t/nofork-mux.t failed with XSConfig installed. Mock::Config was rejected as
Test-Harness can't have any non-core dependencies.
Iterator::Process::Windows objects were all being dtored at global
destruction (a mem leak), not in TAP::Parser::next() where
Iterator::Process::Unix objs were dtored.
Previously TAP::Parser::Iterator class was pull based, now add an optional
push design so a central event loop can add data blocks to a Iterator.
The existing select() design is O(n), the Win32 Async layer is a FIFO/LIFO
O(1) queue (a MS IOCP). Adding a would_block() or can_read()
(AKA "return scalar(@{$self->{'buf'}});" } method to the
Iterator::Process::Windows() is a bad design as that is O(n) so do it
the right way by pushing data into the Iterator.
Remove unused $state var from day 1 of sub pragma in commit
"Pragma support."

Combine 2 getter sub calls into 1 property in has_problems. Push the
value into the obj instead of fetch it.

Previously $self->tests_run() executed 4 times for every .t proc according
to single stepping and NYTProf. Call it only once per .t proc for
efficiency. tests_run is an integer.
save memory by not loading Carp into a typical EUMM test_harness proc
although this commit doesn't actually stop loading Carp.pm due to
p5p controlled modules that will have to be fixed one day

TAP::Harness remove require Carp/use Carp because Carp is never directly
called in the .pm

Scheduler::Job and Scheduler::Spinner dont use Carp, remove it
remove ops+pad var in Aggregator, less memory

TAP::Parser::Aggregator and TAP::Parser::IteratorFactory switch to a lazy
loaded _croak/_confess from TAP::Object, no need to execute "require Carp"
when it wont even croak most of the time

TAP::Object remove unused my vars
@bulk88
Copy link
Contributor Author

bulk88 commented Oct 25, 2024

Bump, this PR will soon be able to drive.

@mohawk2
Copy link
Member

mohawk2 commented Nov 1, 2024

Thanks for the bump! You can see this PR has conflicts that GH is saying needs resolving? Also, Travis is gone now, and there's now GitHub Actions that does Windows (though Perl <=5.20 is failing, that wants fixing).

@Leont
Copy link
Member

Leont commented Nov 2, 2024

Bump, this PR will soon be able to drive.

This PR is rather big and complicated. Realistically it's a huge hack that was needed because Test::Harness's guts are broken. But IO is also kind of broken on unix, so if anything this branch is an argument for a much deeper rewrite of Test::Harness.

@bulk88
Copy link
Contributor Author

bulk88 commented Nov 3, 2024

Bump, this PR will soon be able to drive.

This PR is rather big and complicated. Realistically it's a huge hack that was needed because Test::Harness's guts are broken.

This PR is 16 commits from 2016, Most of the 16, are irrelevant to adding Win32 parallel tap feature. I can remove them easily. The 16 commits are intentionally very tiny patches for git history reasons. And basically can be split into 16 PRs if someone wants me to really make 15 new PRs in row for Harness.pm after a rebase . I'm open for input.

This is a very long post b/c im including API design choices in this post for archive reasons if anyone looks 10 years from now at this.

But IO is also kind of broken on unix, so if anything this branch is an argument for a much deeper rewrite of Test::Harness.

I will just say right now bluntly, P5P will never allow https://metacpan.org/pod/EV http://software.schmorp.de/pkg/libev.html or https://libuv.org/ into core as a dependency. CPAN UV:: all .pm+.xs files, is 143.354 bytes. CPAN UV::'s upstream is libuv, a 3,225,734 bytes uncompressed tarball, that is owned by Google/NodeJS LLC, and libuv is not Artistic License, and Toolchain/P5P have to fork and perpetual manual resyncs, of libuv plain-C if CPAN UV:: becomes embedded in blead/CPAN River. A syntax error in the P5P stable tarball, or the Harness.pm CPAN tarball, will brick all Perl users on earth in a couple minutes or hours......

Note, for the rest of this post, what I am calling Win32::APipe is this rough alpha code from 2016 https://github.com/bulk88/Win32-APipe . Win32::APipe has never been published on CPAN. Its name can be changed if anyone thinks of a better package name. Win32::APipe CPAN v.0.01 will have a big scary warning in POD that says

This is a private module exclusively used by and part of Test::Harness. External usage of this module on CPAN is not supported. LINK__TO__TEST__HARNESS__MCPAN

APipe.pm 2016 is 813 bytes, effectively empty. our $VERSION = '0.01'; require XSLoader; XSLoader::load('Win32::APipe', $VERSION); .

APipe.xs 2016 is 30,076 bytes. 30KB/800 lines of XS. 800 lines or 400 lines for v0.01 of XS owned by Perl Community, is very different from 3MB of FOSS code owned by Google LLC. The 2016 API half-Contract between APipe:: and Harness::`Windows.pm, is 2 P5 methods, 1 P5 sub, ~6 P5 hash keys.

APipe.xs 2016, has way too much #if 0 and // and experiment code in. v0.01 APipe.xs will probably be 400 lines or 600 lines because the disabled or failed experiments will get deleted. Its going to shrink.

This PR looks huge, but look at the 16 commits individually. The combined patch is huge because it has alot of irrelevant to this ticket generic perl optimizations thrown around from 2016. I can easily remove them but I want some input, if anyone sees something that could be changed, on this 2016 branch before I try shaving new LOCs, into a much smaller 2024 branch.

Counting that, the 2016 API, is 9 tokens total. If this a JAPH contest and not CPAN code, the API can be reduced to 3 or 4 tokens. So because the 2016 API, which runs correctly as a POC, is 9 tokens. Any realistic final API between Harness and APipe is 5 tokens min, 18 tokens max. JAPH contest style is monkey patching 3 PP keywords.

Writing all the code for Harness.pm to use https://metacpan.org/pod/UV is an extreme forklift, or might be abandoned half way through for some unsolvable API design reason by the author. "Author" is anybody and any perl dev, not necessarily not me.

My personal nickname for the code in 2016 and right now 2024 is a "TAP::Parser::Iterator::Process::Windows::XS" object. I'm using the name Win32::APipe so its obvious for discussion in this PR/commit, where Harness.pm is handing off control to the new code. Test::Harness.pm is a very large PP module right now, and always has been PP. So I think Harness.pm must stay as PP. Adding XS, and a Win32 only .xs, to the Harness.pm repo sounds like a non starter to me.

So because my plan is that APipe.xs has to be another repo, and another CPAN tarball for logistics. If APipe.xs gets published on CPAN, I'll probably throw COMAINT to leont, steve hay and tonyc b/c large public transit vehicle with rubber wheels factor. I can't be the only commit bit person for a Toolchain or P5P category module, even though I think APipe.xs is so small at 800 lines @ 2016 branch and will shrink b4 "stable release" on cpan. Because APipe.xs is only tiny at 800 lines, it will take 5 or 8 years for the first bug ticket and then someone has to cut a new release on CPAN.

APipe.pm stays empty forever. The "PP" half of APipe::, whatever the PP half is, big or small, has to stay in Harness.pm repo/tarball, so any grep of Harness.pm code base in future, the PP half will be seen by a future maint person with a grep. Anyone who wants to touch the portable POSIX half of Harness.pm has to see the Win32 PP side, for ideas etc. Its not a Perl thing to split all condition blocks for BSD, OSX, VMS, Solaris, etc, into separate tarballs, because those aren't real "OSes". Or the project owner has a policy BSD and Linux are commercial products that can't be mention in our free POSIX software. You see that file called "LICENSE" in Linux? Its not free software.

APipe.xs might never get CPAN release 0.02. It only uses kernel32.dll, and MS WinAPI guarantees kernel32's ABI vs .exe'es/.dll's, for eternity for each MS CPU arch. Kernel32's API/WinNT CreateFile/WinNT IOCP functions, are frozen since NT 3.51/1995. They probably are frozen since OS/2 1.0's SDK 1987.

In 2016, the most controversial choice I did is, no Windows 98/ME support. Win32 Perl and Harness.pm on Win98 Kernel will just call the universal current PP open3() <> waitpid() code in Harness.pm. In theory APipe.xs and Win NT 3.51 and up will do parallel TAP correct, no problems. IOCP API is the controversial choice.

Less controversial is APipe.xs calls RegisterWaitForSingleObject() https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-registerwaitforsingleobject That is from kernel32.dll, min sys requirement is Win2k and up. Sorry WinNT 4.0. Out of luck, BUT WAIT.

There are easy fallback shims floating around on google on emulating RegisterWaitForSingleObject. IIRC my memory, IE 4.0 installer, which supports Win 95 and up, and NT 3.51 and up. Comes with SHQueueUserWorkItem in shlwapi.dll https://learn.microsoft.com/en-us/windows/win32/shell/shlwapi-wrappers

Once you get access to SHQueueUserWorkItem in Win95 with IE4 upgrade, you get the building block, to shim/fallback the rest of Win2k's brand new thread API with a dozen or 5 lines of code per fallback. So when someone files a bug against Test::Harness demanding NT 3.51 or NT 4.0 support, the fix is easy and already exists.

There is no way ever, to emulate IOCP APIs on Win 95/98/ME. Nobody has ever tried, and you won't get anywhere. FILE_FLAG_OVERLAPPED (win32 async) is documented by MS as "ignored-Win 95/98/ME".

The API contract from OS/2 1.0 or NT 3.0, says FILE_FLAG_OVERLAPPED is a request, not a command. It is documented as UB, if after passing the FILE_FLAG_OVERLAPPED flag, will the I/O execute sync block or as async. Windows reserves the right to execute any and all I/O calls that are created with FILE_FLAG_OVERLAPPED flag as sync block I/O at any time.

The Win16 kernel from Win 3.1, is the same code as the Win95/ME kernel. Nothing function call, or flag in a struct, exists on the driver side of that Win16 kernel, 3.1 or ME, that allows "return to ring 3 usermode half way through read(), and I refuse to fill in foo->retval member with -1, 0, or 1".

So summary, 95/ME Perl users filing tickets against Harness.pm. Rejected-legacy/portable block code in Harness.pm works perfectly.

NT 3.51 Perl users filing tickets against Harness.pm, Fix it-probably 1 hour of work. Its a copy paste from google of backporting RegisterWaitForSingleObject with SHQueueUserWorkItem.

So I can't really finish APipe.xs or move from alpha/a rough hack stage, unless Harness::.pm and APipe::.pm, have a private API contract for the the 4-8 features/methods/keys needed between the 2 .pm'es. The Harness.pm on CPAN with new Win32 parallel feature and APipe.pm on CPAN, basically must be published in lock step on CPAN, nothing else makes sense.

APipe.pm/.xs has no provisions by me, for any code reuse by "CPAN" or anyone but Harness.pm. The 2 should be in the same repo, but aren't in the same repo b/c .xs problem/design choice. So yeah, someone who is not me, needs to comment on the 5-10 methods/hash keys between APipe.pm and Harness.pm, because changing both sides in the future at "probably stable" phase is harder than right now at POC hack stage phase.

I might move some 15-30 statements from 2016 Harness.pm to 2016 APipe.pm/.xs or other way around for a cleaner API boundary or something, but its minor.

Note, the new file called lib/TAP/Parser/Iterator/Process/Windows.pm at https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/52/files#diff-789f0bbc4a3b0a043a5a03bd3b24457c84bf82621aba98cded2073780c9610c3

in a refactor, sort of could get renamed, or certain PP subs, moved to the 2016 almost empty APipe.pm file for code style reasons. IIRC in 2016 leont at the hackathon had no comment on API split, since getting the Win32 Parallel POC test to compile and execute atleast once ever, was a higher priority than discussing method names.

I'm not too sure about new file lib/TAP/Parser/Iterator/Process/Windows.pm vs new file lib/TAP/Parser/Iterator/Process/Unix.pm vs current file lib/TAP/Parser/Iterator/Process.pm thing I did. lib/TAP/Parser/Iterator/Process/Unix.pm is moving alot of current code, not for any engineering reason, but only style reasons.

The real change is basically

    my $class;
    if(!IS_WIN32 || (eval { require TAP::Parser::Iterator::Process::Windows }, $@)) {
            require TAP::Parser::Iterator::Process::Unix;
            $class = 'TAP::Parser::Iterator::Process::Unix';
    } else {
        $class = 'TAP::Parser::Iterator::Process::Windows';

and splitting TAP/Parser/Iterator/Process.pm into TAP/Parser/Iterator/Process/Unix.pm and TAP/Parser/Iterator/Process/Windows.pm. Or Unix.pm``` base class with misc Windows.pmmethod replacements. Or keepTAP/Parser/Iterator/Process.pmunmodified, but create aWindows.pmclass that inheritsProcess.pm```. I have no opinion on design # number 1 vs # number 2. Open to input.

Note, all API or hooks for TAP Win32 Parallel, can ONLY go in the current TAP/Parser/Iterator/Process.pm https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/TAP/Parser/Iterator/Process.pm

https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/TAP/Parser/Iterator/Array.pm and https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/TAP/Parser/Iterator/Stream.pm are NEVER USED by blead perl, and NEVER USED by EU::MM. Both of those classes, also don't implement select() on Unix perl, or specifically Multiplexer.pm is special cased to not call select() on those 2 classes. For these 2 reasons, Array.pm and Stream.pm are not going to be used.

The only real changes from a Harness.pm view are 2 things.

A sub (Win32 XSUB) must be called to read a child proc's STDOUT object to get a scalar string of TAP. Can't do <>.

2nd change of not calling PP keywords select, open3, <>, and waitpid . instead Harness is calling 3 Win32 XSUB analogs of open3, <> and, waitpid. Note, the 2016 code in this PR does not have any method copy cat of select. 2016 lib/TAP/Parser/Iterator/Process/Windows.pm is a little sneaky.

Any and every call 2016 Harness.pm does, to fake <> copy cat aka P5 method ->next() in lib/TAP/Parser/Iterator/Process/Windows.pm. <> copy cat method, secretly is pumping the Win32 I/O event loop non-stop, for ALL the active STDOUT FDs/FHs/Win32 kernel handles/Win32 pipe handles, for all child TAP emitter perl procs, in 1 shot/1 call to <> copy cat method.

<> copy cat method keeps secretly queuing/catting char *s of STDOUT TAP, into all SVPV buffers for all child procs, until there is "1 newline/line" or 1 byte of output, of the official FD/FH, that was passed to <> copy cat method, Basically perfectly emulating P5 PP <>. Harness.pm thinks it executed sync blocking I/O PP <>. Harness.pm is unaware, and doesn't need to know, because it is a secret implementation detail, that fake <> copy cat method, was touching many other Harness.pm/APipe.pm P5 not-real-FDs/P5 blessed objs, while pretending to only touch ONE Harness.pm P5 not-real-FDs/P5 blessed obj.

This keeps very little changes, code wise, in the current unix/posix/win32/cross platform portable half of Harness.pm code.

2016 POC Harness.pm never calls PP select() on WinOS,
2016 CPAN Harness.pm never calls PP select() on WinOS,
2024 final feature release on CPAN Harness.pm never calls PP select() on WinOS,

The result is, "what does PP keyword select() do on Perl on WinOS?". Best answer, is no answer. That question never needs to be answered in Harness.pm. Nothing changed.

Again, biggest change TAP::Harness must know on Win32, a child proc's STDOUT object can't be a a real PerlIO/perl glob object but is a generic blessed perl object, so no calling <> or read/sysread but instead $buffer = $fh->specialwin32read(); or ->next() in 2016 POC.

The rest of the parallel TAP parsing implementation is just Win32 specific Async IO stuff that lives in XS in Win32::APipe, or whatever someone suggests for that CPAN module before I publish APipe as stable/final code.

It can be done as a contest (JAPH style), but its too much code to fake, to implement Win32 parallel harness feature, with zero code changes to Harness.pm. Also to fake it, there will be alot of pointless runtime overhead, and one time writing lines of new code, and much more time/difficulty/super brittle for any future maintenance or debugging.

To do these 3 things by aggressive monkey patching IPC::Open3 and IO::Select at runtime and writing a full perltie fake filehandle class in semi-pure Perl, or CORE:: keyword hooking. Hey ever heard of Op tree patching in Perl? ..... ...... Ummm ....

Monkey patching is almost never production grade or CPAN grade code, and almost never the right way to solve anything. So this has to be solved at a Harness.pm level with an small new package/class/API in Harness.pm to "other side" .pm, not monkey patches at 3rd party level. And P5P won't accept any code into its repo that looks like a JAPH. Since whatever is the final code, it had to be P5 core include quality, that is the ultimate goal.

Basically Harness.pm has to call method XSUBs 1 for 1 replacement, on Win32, instead of PP keywords on child proc "STDOUT" "objects". The Win32 code is pretty basic XS code doing Win32 specific Async kernel IO, along with a serialization/msg queues of var length string buffers, coming off child procs. basically what Harness.pm already does, but calling Win32 specific methods instead of certain PP keywords when doing IO. The real backend (APipe.pm) does 2 tricks internally to pull off parallel TAP. Fake open3() does the secret first (async/non-block) <>.

The 1st fake <> does 2 things internally. Start a new async/non-block real <>/Win32 kernel read(). Then pop the previous real Win32 kernel <> result string to Harness.pm. Because all Perl methods in P5, that are poping a secret char * string or a secret scalar hash key, inside that perl object, as a method scalar string retval to caller. That is guaranteed non-blocking everywhere.

I don't want to really change or touch or implement Harness.pm/Multiplexer's current select() or IO::Select loop design. And this design keeps new code in the cross platform Harness.pm very low. It looks cleaner, to not fill https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/TAP/Parser/Multiplexer.pm and https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/TAP/Parser/Iterator/Process.pm with alot of Win32 only branches and lines of code that smell and look like the current PP select()``` related code, sitting next to the cross platform current PP ```select() related lines.

Also $fh->specialfakewin32select(); if it existed, has to get executed each time, right after, PP select().

In theory Harness.pm, with BOTH a TCPIP socket and pipe FH/process, is supposed to work on Unix and Win32???? right??

So I assume the correct design is Harness.pm must do PP select()/->win32specialfakeselect() one after another in the select loop on WinOS or atleast leave provisions.

Does anyone ever actually use Harness with TCP sockets or its dead code? semi jk

I dont want ->win32specialfakeselect(); to deal with plain C/libc/PP/perl 5, FDs/FHs. ->win32specialfakeselect(); should only be dealing with W32::APipe::Process objs as input. That minimizes the lines of new code needed in Harness.pm/APipe.pm/APipe.xs, and leaves any future libc FH FD drama/bug tickets for P5 interp (P5P devs) or the IPC::Open3 and IO::Select maintainers to deal with libc/FH/FD drama. And nothing changes "bug ticket scope" wise from current CPAN stable version of Harness.pm.

Describing fake select() in the last couple paragraphs, is 5x more, than fake <>. Therefore for v0.01, seems smarter for APipe.pm to hide the internal Win32 IO event loop from Harness.pm, vs scattering new Win32 only code in the cross platform current stable Harness::*XYZ::.pm files.

Im keeping in mind to minimize pages of new code for Harness.pm/APipe.pm maintainers, me, and anyone else in the future.

No UV::.pm, no libuv.so. Copy pasting P5P PP, C, XS code, or anything from IPC::Open3/IO::Select .pm, for sake of "emulating POSIX stdio" on Win32, is tempting to some people, but that is a code fork, minor future maintenance risk. And while other Perl devs will think religiously emulating libc stdio function prototypes and API spec documents is always the correct solution in any software app in any framework, language, or OS, I disagree. The code in this PR has no reuse beyond Harness.pm.

I know nobody in Toolchain/Perl community, will ever religiously synchronize anything maintainers of P5P core/IPC::Open3/IO::Select do, with near identical subs/funcs/algorithms/lines of code that live in Harness.pm or APipe.pm that are doing "perfectly emulating POSIX stdio on WinOS" attempts.

I don't want to ever look back on this PR or this code, me, or any other Win32 Perl user. I assume a large city bus will run me over 1 day after Perl 5.42 or Perl 5.44 tarball is released. So less new LOC in Harness.pm or APipe.pm side is better than for any v0.01.

Its best to avoid, tons of new LOC that exist in 1 sub for some other new LOC in another sub (caller/callee),

in the same exact commit to Harness.pm,

to see "POSIX stdio" API behavior. between callee/caller pairs on Perl for WinOS.

This is the end of the design theory of this PR.

<sarcasm>It is well known since 1999 the select() function is a Denial Of Service attack vector found in Linux. It is criminally negligent behavior by the Pearl Ltd. Enterprise has exposed its clients for 25 years to this security vulnerability. I have contacted my barrister and the Ministry about this matter.</sarcasm>

I wonder who gets the joke. APipe.xs 2016 does not have a fake select() method on front end, and does not call the real select() syscall in Win32 on its backend either. Real Windows select() is the WaitForMultipleObjects() function https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects .

Semi-off Topic

This is something I saw last week in 5.41 blead with a C debugger, but I stopped research because I was trying to do something else in blead C code.

POSIX STDIO, Perl 5 yylexer() and the Perl 5.0-5.41 the C PerlIO P5P maintained layers, have a baited dangerous mousetrap, the name of the mousetrap is '''getch()``` or https://pubs.opengroup.org/onlinepubs/9699919799/functions/getchar.html

So, hypothetically if you layer getch() aka POSIX read($fh, $buf, 1, 0), and a utf8 validation algo, and a crlf algo, and the input is 5 MegaBytes long, will CPU usage be O(n^n) or O(!n) of the final program?

Perl 5 is worse than POSIX, its not a mousetrap like in POSIX but instead a landmine with C4.

https://perldoc.perl.org/perliol

Unread()

So lets layer Perl_pp_readline()*getch * utf8_valid((getch()* 5MB)+(Unread(1 byte) * 5MB)) * crlf_valid((getch()*5MB)+(Unread(1 byte) * 5MB)), will the CPU usage of the perl 5.0-5.41 process be O(n^n) or O(!n) ?

PerlIO 5.0-5.41 has a built in safety limit in real life, If you trick PerlIO to do the above behavior, %99 or %100 of the time, it is 4096 bytes or in Perl 5.41 I think I saw 8192 bytes getting bounced by PerlIO. 2ms-5ms overhead of CPU anywhere in any Perl production app, will never be noticed by any XS dev, or PP dev. 4 ms is always invisible to Perl+TK GUI+User's mouse and always invisible to Perl+CGI+Nginix. This isn't a P5P ticket yb/c I didnt research enough what I think I was seeing in my C debugger with 5.41 and yylexer(), and my blead perl build had unstable changes/random code hacking in perl541.dll by me,

@bulk88 bulk88 mentioned this pull request Nov 3, 2024
@mohawk2
Copy link
Member

mohawk2 commented Nov 6, 2024

@bulk88 I'd say pulling out parts you believe are uncontroversial and making separate PRs is definitely a good course of action. Just looking at 2 commits, I don't believe the "add CI testing" should be there at all now; and the VMS one looks like a good idea by itself.

If there is a wider async IO problem existing on Windows, that might be fixed elsewhere first? Apologies for my ignorance, but you refer to WaitForMultipleObjects; is it possible to use any of the Perl-provided Win32 modules to access this? Otherwise, could it be added to https://github.com/Perl/perl5/blob/blead/cpan/Win32/Win32.pm ? Since that module's directory implies it's CPAN-first, that could be added now, and be a Windows-only dep for older Perls (or even Harness could try to load it, and fall back to its current behaviour without).

@mohawk2
Copy link
Member

mohawk2 commented Nov 12, 2024

@bulk88 Thanks for making #134! How do you feel about rebasing what's left here and seeing if it's worth continuing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants