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

Moo conversion #178

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

Moo conversion #178

wants to merge 11 commits into from

Conversation

yanick
Copy link

@yanick yanick commented Sep 7, 2017

Rebase of #140, with a few optimizations that was discussed in its comment threads.

@karenetheridge
Copy link

Would it be possible to rebase this down to one or a smaller handful of commits?

@yanick
Copy link
Author

yanick commented Nov 15, 2018

Sure. Let me see what I can do.

@yanick
Copy link
Author

yanick commented Nov 15, 2018

There we go.

@jomo666
Copy link

jomo666 commented Nov 29, 2018

Please, don't touch the current Xslate with Moo. Fork some new Mooslate or such. Any (even small) speed drop is unacceptable. Moo--.

@karenetheridge
Copy link

@yanick I don't think your force push took effect on the server.

I share the concerns about performance -- some benchmarking is essential to be sure that there isn't a change. I know Moo can be high-performance, but a few things need to be done to ensure that -- e.g. adding in XS accessors.

@@ -623,8 +623,8 @@ sub _compiler {
my $compiler = $self->{compiler};

if(!ref $compiler){
require Mouse;
Mouse::load_class($compiler);
require Class::Load;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add Class::Load::XS to the list of optional dependencies -- e.g. via Dist::Zilla::Plugin::DynamicPrereqs require('Class::Load::XS') if not want_pp() and can_xs(); (or the equivalent unrolled code) in Makefile.PL.

@karenetheridge
Copy link

Looks like there is some work to do to get appveyor to pass, as well. (missing prereq declarations?)

It would also be nice to see this tested on travis. this is a good place to start as a template - https://github.com/p5sagit/JSON-MaybeXS/blob/master/.travis.yml

@yanick
Copy link
Author

yanick commented Nov 29, 2018

@karenetheridge

I don't think your force push took effect on the server.

What do you mean? Which server are we talking about?

@karenetheridge
Copy link

The github server - it doesn't appear that the squash took effect.

@karenetheridge
Copy link

#140 contains more discussions re benchmarking. As @shadowcat-mst said, we do not expect any performance degradation with Moo, so if there is any, it is something we can solve with the use of a profiler.

@yanick
Copy link
Author

yanick commented Nov 29, 2018

The github server - it doesn't appear that the squash took effect.

Ah, no, it did. I just didn't squashed to a single commit. I kept the part of the history that I thought could be useful, as well as the distinction between my commits and Charlie's.

@karenetheridge
Copy link

ok. anyway, it's more important that we get this working with no performance degradation :)

@yanick
Copy link
Author

yanick commented Nov 29, 2018

[performance] I'm conferencing as we speak, but as soon as I have some time I'll rerun the benchmarks and see what they reveal.

@yanick
Copy link
Author

yanick commented Nov 29, 2018

Appveyor is passing, yay! \o/

* remove commented out default
* removes trailing whitespaces
* add Types::Standard as a dependency
@@ -23,6 +23,7 @@ my %args = (
},

requires => {
'Types::Standard' => '0',
'Data::MessagePack' => '0.38',
'Encode' => '2.26',
'Mouse' => 'v2.5.0',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this prereq should also be changed (and also in cpanfile).

@@ -3,7 +3,7 @@ use Moo 2.000001;

use Text::Xslate::Util qw(p $DEBUG);

use MooX::Types::MooseLike::Base qw(:all);
use MooX::Types::MooseLike::Base qw(:all);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this as well as Types::Standard?

@yanick
Copy link
Author

yanick commented Dec 4, 2018

Performance: so I looked at the benchmark folder, saw there is no direct way to compare different versions of the code, so I got lost in the yak forest and wrote this http://techblog.babyl.ca/entry/benchpress

This being said, I ran benchmarks for interpolate and demo_tt. Some of the results are at http://techblog.babyl.ca/entry/benchpress/files/stats.html, and so far it seems that the interpolate results are within 7% of the performance of the previous version. The results for demo_tt show roughly a penalty of 10% compared to the previous version.

@jonassmedegaard
Copy link

more than two years later - what is the reason this hasn't been merged?

@yanick
Copy link
Author

yanick commented Mar 20, 2021

Probably slipped between the cracks, or the 10% speed penalty is too high a price to pay. Might be interesting to replay the benchmarks now, as time and versions passed.

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.

5 participants