develooper Front page | perl.perl5.porters | Postings from February 2018

Re: [perl #132252] Blead Breaks CPAN: Role::Tiny, Variable::Magic,Moo

Thread Previous | Thread Next
From:
demerphq
Date:
February 2, 2018 17:34
Subject:
Re: [perl #132252] Blead Breaks CPAN: Role::Tiny, Variable::Magic,Moo
Message ID:
CANgJU+VY-zxEN2YwEao7mixHY0_=iV6j28mXwHnA5S9jMNmHRQ@mail.gmail.com
On 29 Jan 2018 18:01, "Sergey Aleynikov via RT" <perlbug-followup@perl.org>
wrote:

On Mon, 29 Jan 2018 05:51:38 -0800, haarg wrote:
> This seems like lot of breakage for such a tiny benefit.

All those modules are already broken on the current perl version (and some
versions back in time), they just don't test for it - as globs are already
not created for subs in the 'main' package.

> Additionally, since the stash entries get de-optimized to globs when
> called as methods, this change will actually lead to increased memory
> usage on servers that fork.  Many methods won't get called until post-
> fork, so the globs will need to be created for every fork instead of
> being able to benefit from copy-on-write.

You can't rely on copy-on-write for almost all non-optree data (and
sometimes even on optree too), as any run-time SV upgrade/free will touch
the whole page.


It will touch a whole page of Sv *heads*, which are slab allocated anyway.

So I don't follow your point.


Furthermore

, there're constant subs (sub foo () {42}), which are almost never called
as methods - and by reverting this we will loose memory savings on them


That is a piffle compared to the methods that will get forked. If we keep
this optimization $work will disable it for sure in our builds. Making our
code even less fork friendly is imo not a step forward.

Yves

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