Comments (2)
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.
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)
- No unknown public methods test failing HOT 1
- Indented here-doc loses whitespace before final delimiter
- provide delimiters for PPI::Token::QuoteLike::{Words,Regexp,Command}, PPI::Token::Quote::{Literal,Interpolate}
- dies with unicode bare key name HOT 1
- use signatures not supported by PPI HOT 1
- Lexical subroutine doesn't return correct name HOT 2
- Misparse bareword as label HOT 7
- Maybe bump minimum Perl version to 5.008?
- try/catch syntax misparsed
- Extending PPI HOT 2
- Parse DSL as a sub HOT 2
- The Keyword Question HOT 20
- Verify behaviour of BEGIN, UNITCHECK, CHECK, INIT and END
- TODO: tidy everything
- TODO: remove superfluous `#pod` lines
- TODO: verify INHERITANCE documentation for all classes
- TODO: auto-generate copyright, author, contributor notices (see strictures.pm)
- TODO: probably un-inline Inlined $self->__add_element(shift);
- TODO: create test cases for the constructs in Syntax::Construct
- Heredocs are stripped from stringified Document object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppi.