Giter Site home page Giter Site logo

Caching ->isa() about ppi HOT 2 OPEN

perl-critic avatar perl-critic commented on June 19, 2024
Caching ->isa()

from ppi.

Comments (2)

adamkennedy avatar adamkennedy commented on June 19, 2024

I haven't looked into it before, although I was under the impression that
isa already cache it's checks.

I'd be open to investigations in this area, although it should be noted
that one gotcha you are likely to encounter ifs that elements do get
released sometimes during the parsing process.

There's also memory potential memory bloat issues. I'm not sure of its a
show stopper or not, just letting you know it's likely to be a
consideration, and to keep an eye on it.

Adam
On Dec 18, 2013 8:17 AM, "Andy Lester" [email protected] wrote:

Has anyone looked into caching ->isa() at the PPI::Element level?

The number of calls to ->isa() in a "make nytprof" run of Perl::Critic is
staggering, and I have to think that at least some of those are redundant.
Maybe it would be a win if each call to ->isa( 'whatever' ) would cache the
result of that lookup.

I can go poking at this, but didn't want to waste my time if this was
already considered and rejected.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11
.

from ppi.

moregan avatar moregan commented on June 19, 2024

perl5101delta.pod says:

=head1 Performance Enhancements

=over 4

=item *

A new internal cache means that C<isa()> will often be faster.

from ppi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.