← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 16:10:05 2022
Reported on Wed Dec 14 16:12:58 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/YAML/PP/Lexer.pm
StatementsExecuted 3206241 statements in 3.31s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
61685101873ms994msYAML::PP::Lexer::::_push_tokens YAML::PP::Lexer::_push_tokens
2792631539ms1.22sYAML::PP::Lexer::::_fetch_next_tokens YAML::PP::Lexer::_fetch_next_tokens
1888411469ms1.93sYAML::PP::Lexer::::fetch_plain YAML::PP::Lexer::fetch_plain
1849731235ms379msYAML::PP::Lexer::::_fetch_next_line YAML::PP::Lexer::_fetch_next_line
1345111223ms1.03sYAML::PP::Lexer::::fetch_next_tokens YAML::PP::Lexer::fetch_next_tokens
58874191202ms202msYAML::PP::Lexer::::CORE:regcomp YAML::PP::Lexer::CORE:regcomp (opcode)
75666161196ms196msYAML::PP::Lexer::::CORE:subst YAML::PP::Lexer::CORE:subst (opcode)
16078422175.1ms75.1msYAML::PP::Lexer::::line YAML::PP::Lexer::line
20561169.0ms357msYAML::PP::Lexer::::fetch_quoted YAML::PP::Lexer::fetch_quoted
20572159.8ms64.2msYAML::PP::Lexer::::push_subtokens YAML::PP::Lexer::push_subtokens
20561146.0ms61.3msYAML::PP::Lexer::::_read_quoted_tokens YAML::PP::Lexer::_read_quoted_tokens
771944240.4ms40.4msYAML::PP::Lexer::::next_tokens YAML::PP::Lexer::next_tokens
637422139.4ms39.4msYAML::PP::Lexer::::set_offset YAML::PP::Lexer::set_offset
762157237.2ms37.2msYAML::PP::Lexer::::flowcontext YAML::PP::Lexer::flowcontext
134562127.2ms27.2msYAML::PP::Lexer::::CORE:match YAML::PP::Lexer::CORE:match (opcode)
637422126.6ms26.6msYAML::PP::Lexer::::offset YAML::PP::Lexer::offset
394384122.2ms22.2msYAML::PP::Lexer::::next_line YAML::PP::Lexer::next_line
374751120.1ms20.1msYAML::PP::Lexer::::context YAML::PP::Lexer::context
269118118.9ms18.9msYAML::PP::Lexer::::set_next_line YAML::PP::Lexer::set_next_line
13455119.49ms9.49msYAML::PP::Lexer::::set_block YAML::PP::Lexer::set_block
13455118.63ms8.63msYAML::PP::Lexer::::inc_line YAML::PP::Lexer::inc_line
14025118.34ms8.34msYAML::PP::Lexer::::block YAML::PP::Lexer::block
13456117.62ms7.62msYAML::PP::Lexer::::reader YAML::PP::Lexer::reader
1113.48ms3.77msYAML::PP::Lexer::::BEGIN@10 YAML::PP::Lexer::BEGIN@10
110211990µs990µsYAML::PP::Lexer::::set_flowcontext YAML::PP::Lexer::set_flowcontext
111149µs320µsYAML::PP::Lexer::::fetch_block YAML::PP::Lexer::fetch_block
17621106µs106µsYAML::PP::Lexer::::set_context YAML::PP::Lexer::set_context
11133µs36µsYAML::PP::Parser::::BEGIN@1YAML::PP::Parser::BEGIN@1
118120µs20µsYAML::PP::Lexer::::CORE:qr YAML::PP::Lexer::CORE:qr (opcode)
33218µs18µsYAML::PP::Lexer::::init YAML::PP::Lexer::init
11113µs41µsYAML::PP::Lexer::::BEGIN@11 YAML::PP::Lexer::BEGIN@11
11113µs26µsYAML::PP::Lexer::::new YAML::PP::Lexer::new
1119µs35µsYAML::PP::Parser::::BEGIN@2.286YAML::PP::Parser::BEGIN@2.286
1116µs48µsYAML::PP::Lexer::::BEGIN@7 YAML::PP::Lexer::BEGIN@7
1114µs21µsYAML::PP::Lexer::::BEGIN@8 YAML::PP::Lexer::BEGIN@8
1113µs3µsYAML::PP::Lexer::::set_reader YAML::PP::Lexer::set_reader
0000s0sYAML::PP::Lexer::::_fetch_next_tokens_directive YAML::PP::Lexer::_fetch_next_tokens_directive
0000s0sYAML::PP::Lexer::::_read_doublequoted YAML::PP::Lexer::_read_doublequoted
0000s0sYAML::PP::Lexer::::exception YAML::PP::Lexer::exception
0000s0sYAML::PP::Lexer::::set_line YAML::PP::Lexer::set_line
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1240µs239µs
# spent 36µs (33+3) within YAML::PP::Parser::BEGIN@1 which was called: # once (33µs+3µs) by YAML::PP::Parser::BEGIN@18 at line 1
use strict;
# spent 36µs making 1 call to YAML::PP::Parser::BEGIN@1 # spent 3µs making 1 call to strict::import
2250µs261µs
# spent 35µs (9+26) within YAML::PP::Parser::BEGIN@2.286 which was called: # once (9µs+26µs) by YAML::PP::Parser::BEGIN@18 at line 2
use warnings;
# spent 35µs making 1 call to YAML::PP::Parser::BEGIN@2.286 # spent 26µs making 1 call to warnings::import
3package YAML::PP::Lexer;
4
511µsour $VERSION = '0.035'; # VERSION
6
7233µs290µs
# spent 48µs (6+42) within YAML::PP::Lexer::BEGIN@7 which was called: # once (6µs+42µs) by YAML::PP::Parser::BEGIN@18 at line 7
use constant TRACE => $ENV{YAML_PP_TRACE} ? 1 : 0;
# spent 48µs making 1 call to YAML::PP::Lexer::BEGIN@7 # spent 42µs making 1 call to constant::import
8220µs238µs
# spent 21µs (4+17) within YAML::PP::Lexer::BEGIN@8 which was called: # once (4µs+17µs) by YAML::PP::Parser::BEGIN@18 at line 8
use constant DEBUG => ($ENV{YAML_PP_DEBUG} || $ENV{YAML_PP_TRACE}) ? 1 : 0;
# spent 21µs making 1 call to YAML::PP::Lexer::BEGIN@8 # spent 17µs making 1 call to constant::import
9
102541µs23.96ms
# spent 3.77ms (3.48+293µs) within YAML::PP::Lexer::BEGIN@10 which was called: # once (3.48ms+293µs) by YAML::PP::Parser::BEGIN@18 at line 10
use YAML::PP::Grammar qw/ $GRAMMAR /;
# spent 3.77ms making 1 call to YAML::PP::Lexer::BEGIN@10 # spent 187µs making 1 call to Exporter::import
11217.1ms269µs
# spent 41µs (13+28) within YAML::PP::Lexer::BEGIN@11 which was called: # once (13µs+28µs) by YAML::PP::Parser::BEGIN@18 at line 11
use Carp qw/ croak /;
# spent 41µs making 1 call to YAML::PP::Lexer::BEGIN@11 # spent 28µs making 1 call to Exporter::import
12
13
# spent 26µs (13+13) within YAML::PP::Lexer::new which was called: # once (13µs+13µs) by YAML::PP::Parser::new at line 29 of YAML/PP/Parser.pm
sub new {
1416µs my ($class, %args) = @_;
15 my $self = bless {
16 reader => $args{reader},
1711µs }, $class;
1813µs113µs $self->init;
# spent 13µs making 1 call to YAML::PP::Lexer::init
1914µs return $self;
20}
21
22
# spent 18µs within YAML::PP::Lexer::init which was called 3 times, avg 6µs/call: # once (13µs+0s) by YAML::PP::Lexer::new at line 18 # once (4µs+0s) by YAML::PP::Parser::init at line 115 of YAML/PP/Parser.pm # once (1µs+0s) by YAML::PP::Parser::parse at line 151 of YAML/PP/Parser.pm
sub init {
2331µs my ($self) = @_;
2436µs $self->{next_tokens} = [];
2533µs $self->{next_line} = undef;
2631µs $self->{line} = 0;
2732µs $self->{offset} = 0;
2838µs $self->{flowcontext} = 0;
29}
30
313943856.4ms
# spent 22.2ms within YAML::PP::Lexer::next_line which was called 39438 times, avg 563ns/call: # 18884 times (11.1ms+0s) by YAML::PP::Lexer::fetch_plain at line 367, avg 590ns/call # 18497 times (9.75ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 136, avg 527ns/call # 2056 times (1.31ms+0s) by YAML::PP::Lexer::fetch_quoted at line 620, avg 639ns/call # once (1µs+0s) by YAML::PP::Lexer::fetch_block at line 519
sub next_line { return $_[0]->{next_line} }
322691148.1ms
# spent 18.9ms within YAML::PP::Lexer::set_next_line which was called 26911 times, avg 702ns/call: # 13455 times (8.34ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 150, avg 620ns/call # 6386 times (5.20ms+0s) by YAML::PP::Lexer::fetch_plain at line 398, avg 814ns/call # 5040 times (3.85ms+0s) by YAML::PP::Lexer::fetch_plain at line 392, avg 765ns/call # 1424 times (1.02ms+0s) by YAML::PP::Lexer::fetch_quoted at line 706, avg 716ns/call # 598 times (460µs+0s) by YAML::PP::Lexer::fetch_quoted at line 697, avg 769ns/call # 6 times (0s+0s) by YAML::PP::Lexer::fetch_block at line 561, avg 0s/call # once (1µs+0s) by YAML::PP::Lexer::fetch_next_tokens at line 221 # once (1µs+0s) by YAML::PP::Lexer::_fetch_next_line at line 143
sub set_next_line { $_[0]->{next_line} = $_[1] }
331345619.4ms
# spent 7.62ms within YAML::PP::Lexer::reader which was called 13456 times, avg 567ns/call: # 13456 times (7.62ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 141, avg 567ns/call
sub reader { return $_[0]->{reader} }
3417µs
# spent 3µs within YAML::PP::Lexer::set_reader which was called: # once (3µs+0s) by YAML::PP::Parser::set_reader at line 70 of YAML/PP/Parser.pm
sub set_reader { $_[0]->{reader} = $_[1] }
3577194106ms
# spent 40.4ms within YAML::PP::Lexer::next_tokens which was called 77194 times, avg 523ns/call: # 61685 times (32.4ms+0s) by YAML::PP::Lexer::_push_tokens at line 880, avg 526ns/call # 13451 times (6.72ms+0s) by YAML::PP::Lexer::fetch_next_tokens at line 182, avg 499ns/call # 2057 times (1.21ms+0s) by YAML::PP::Lexer::push_subtokens at line 906, avg 590ns/call # once (3µs+0s) by YAML::PP::Parser::parse_tokens at line 344 of YAML/PP/Parser.pm
sub next_tokens { return $_[0]->{next_tokens} }
36160784217ms
# spent 75.1ms within YAML::PP::Lexer::line which was called 160784 times, avg 467ns/call: # 61685 times (25.1ms+0s) by YAML::PP::Lexer::_push_tokens at line 881, avg 406ns/call # 18884 times (11.5ms+0s) by YAML::PP::Lexer::fetch_plain at line 381, avg 607ns/call # 18884 times (8.15ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 355, avg 432ns/call # 14054 times (5.90ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 295, avg 420ns/call # 13449 times (6.76ms+0s) by YAML::PP::Lexer::fetch_next_tokens at line 217, avg 503ns/call # 7598 times (3.94ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 307, avg 519ns/call # 6456 times (3.49ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 303, avg 541ns/call # 5040 times (2.76ms+0s) by YAML::PP::Lexer::fetch_plain at line 391, avg 548ns/call # 2057 times (1.01ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 278, avg 490ns/call # 2057 times (799µs+0s) by YAML::PP::Lexer::push_subtokens at line 907, avg 388ns/call # 2056 times (1.39ms+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 742, avg 675ns/call # 2056 times (1.15ms+0s) by YAML::PP::Lexer::fetch_quoted at line 626, avg 559ns/call # 2056 times (950µs+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 748, avg 462ns/call # 1791 times (729µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 340, avg 407ns/call # 1424 times (660µs+0s) by YAML::PP::Lexer::fetch_quoted at line 704, avg 463ns/call # 689 times (656µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 336, avg 952ns/call # 529 times (244µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 256, avg 461ns/call # 15 times (5µs+0s) by YAML::PP::Lexer::fetch_block at line 605, avg 333ns/call # once (3µs+0s) by YAML::PP::Lexer::fetch_next_tokens at line 208 # once (1µs+0s) by YAML::PP::Lexer::fetch_block at line 538 # once (1µs+0s) by YAML::PP::Lexer::fetch_block at line 548 # once (0s+0s) by YAML::PP::Lexer::fetch_block at line 526
sub line { return $_[0]->{line} }
37sub set_line { $_[0]->{line} = $_[1] }
3863742187ms
# spent 26.6ms within YAML::PP::Lexer::offset which was called 63742 times, avg 417ns/call: # 61685 times (25.7ms+0s) by YAML::PP::Lexer::_push_tokens at line 882, avg 416ns/call # 2057 times (900µs+0s) by YAML::PP::Lexer::push_subtokens at line 908, avg 438ns/call
sub offset { return $_[0]->{offset} }
396374297.9ms
# spent 39.4ms within YAML::PP::Lexer::set_offset which was called 63742 times, avg 618ns/call: # 61685 times (37.9ms+0s) by YAML::PP::Lexer::_push_tokens at line 900, avg 614ns/call # 2057 times (1.53ms+0s) by YAML::PP::Lexer::push_subtokens at line 936, avg 745ns/call
sub set_offset { $_[0]->{offset} = $_[1] }
401345519.5ms
# spent 8.63ms within YAML::PP::Lexer::inc_line which was called 13455 times, avg 641ns/call: # 13455 times (8.63ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 147, avg 641ns/call
sub inc_line { return $_[0]->{line}++ }
413747560.7ms
# spent 20.1ms within YAML::PP::Lexer::context which was called 37475 times, avg 537ns/call: # 37475 times (20.1ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 263, avg 537ns/call
sub context { return $_[0]->{context} }
42176262µs
# spent 106µs within YAML::PP::Lexer::set_context which was called 176 times, avg 602ns/call: # 88 times (64µs+0s) by YAML::PP::Lexer::fetch_quoted at line 694, avg 727ns/call # 88 times (42µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 275, avg 477ns/call
sub set_context { $_[0]->{context} = $_[1] }
4376215111ms
# spent 37.2ms within YAML::PP::Lexer::flowcontext which was called 76215 times, avg 488ns/call: # 20941 times (10.0ms+0s) by YAML::PP::Parser::parse_tokens at line 379 of YAML/PP/Parser.pm, avg 478ns/call # 18884 times (7.68ms+0s) by YAML::PP::Lexer::fetch_plain at line 371, avg 407ns/call # 14054 times (7.92ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 286, avg 564ns/call # 13449 times (7.62ms+0s) by YAML::PP::Lexer::fetch_next_tokens at line 208, avg 566ns/call # 5040 times (2.21ms+0s) by YAML::PP::Lexer::fetch_plain at line 405, avg 438ns/call # 2056 times (1.01ms+0s) by YAML::PP::Lexer::fetch_quoted at line 694, avg 490ns/call # 1791 times (762µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 342, avg 425ns/call
sub flowcontext { return $_[0]->{flowcontext} }
4411022.51ms
# spent 990µs within YAML::PP::Lexer::set_flowcontext which was called 1102 times, avg 898ns/call: # 1102 times (990µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 343, avg 898ns/call
sub set_flowcontext { $_[0]->{flowcontext} = $_[1] }
451402519.3ms
# spent 8.34ms within YAML::PP::Lexer::block which was called 14025 times, avg 594ns/call: # 14025 times (8.34ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 286, avg 594ns/call
sub block { return $_[0]->{block} }
461345520.8ms
# spent 9.49ms within YAML::PP::Lexer::set_block which was called 13455 times, avg 706ns/call: # 13455 times (9.49ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 146, avg 706ns/call
sub set_block { $_[0]->{block} = $_[1] }
47
4811µsmy $RE_WS = '[\t ]';
4910smy $RE_LB = '[\r\n]';
501118µs249µsmy $RE_DOC_END = qr/\A(\.\.\.)(?=$RE_WS|$)/m;
# spent 44µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 5µs making 1 call to YAML::PP::Lexer::CORE:qr
51122µs217µsmy $RE_DOC_START = qr/\A(---)(?=$RE_WS|$)/m;
# spent 16µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 1µs making 1 call to YAML::PP::Lexer::CORE:qr
52132µs225µsmy $RE_EOL = qr/\A($RE_WS+#.*|$RE_WS+)\z/;
# spent 24µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 1µs making 1 call to YAML::PP::Lexer::CORE:qr
53#my $RE_COMMENT_EOL = qr/\A(#.*)?(?:$RE_LB|\z)/;
54
55#ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
5610smy $RE_NS_WORD_CHAR = '[0-9A-Za-z-]';
5711µsmy $RE_URI_CHAR = '(?:' . '%[0-9a-fA-F]{2}' .'|'. q{[0-9A-Za-z#;/?:@&=+$,_.!*'\(\)\[\]-]} . ')';
5811µsmy $RE_NS_TAG_CHAR = '(?:' . '%[0-9a-fA-F]{2}' .'|'. q{[0-9A-Za-z#;/?:@&=+$_.~*'\(\)-]} . ')';
59
60# [#x21-#x7E] /* 8 bit */
61# | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] /* 16 bit */
62# | [#x10000-#x10FFFF] /* 32 bit */
63
64#nb-char ::= c-printable - b-char - c-byte-order-mark
65#my $RE_NB_CHAR = '[\x21-\x7E]';
6610smy $RE_ANCHOR_CAR = '[\x21-\x2B\x2D-\x5A\x5C\x5E-\x7A\x7C\x7E\xA0-\xFF\x{100}-\x{10FFFF}]';
67
6811µsmy $RE_PLAIN_START = '[\x21\x22\x24-\x39\x3B-\x7E\xA0-\xFF\x{100}-\x{10FFFF}]';
6910smy $RE_PLAIN_END = '[\x21-\x39\x3B-\x7E\x85\xA0-\x{D7FF}\x{E000}-\x{FEFE}\x{FF00}-\x{FFFD}\x{10000}-\x{10FFFF}]';
7010smy $RE_PLAIN_FIRST = '[\x24\x28-\x29\x2B\x2E-\x39\x3B-\x3D\x41-\x5A\x5C\x5E-\x5F\x61-\x7A\x7E\xA0-\xFF\x{100}-\x{10FFFF}]';
71
7210smy $RE_PLAIN_START_FLOW = '[\x21\x22\x24-\x2B\x2D-\x39\x3B-\x5A\x5C\x5E-\x7A\x7C\x7E\xA0-\xFF\x{100}-\x{10FFFF}]';
7311µsmy $RE_PLAIN_END_FLOW = '[\x21-\x2B\x2D-\x39\x3B-\x5A\x5C\x5E-\x7A\x7C\x7E\x85\xA0-\x{D7FF}\x{E000}-\x{FEFE}\x{FF00}-\x{FFFD}\x{10000}-\x{10FFFF}]';
7410smy $RE_PLAIN_FIRST_FLOW = '[\x24\x28-\x29\x2B\x2E-\x39\x3B-\x3D\x41-\x5A\x5C\x5E-\x5F\x61-\x7A\x7C\x7E\xA0-\xFF\x{100}-\x{10FFFF}]';
75# c-indicators
76#! 21
77#" 22
78## 23
79#% 25
80#& 26
81#' 27
82#* 2A
83#, 2C FLOW
84#- 2D XX
85#: 3A XX
86#> 3E
87#? 3F XX
88#@ 40
89#[ 5B FLOW
90#] 5D FLOW
91#` 60
92#{ 7B FLOW
93#| 7C
94#} 7D FLOW
95
96
9712µsmy $RE_PLAIN_WORD = "(?::+$RE_PLAIN_END|$RE_PLAIN_START)(?::+$RE_PLAIN_END|$RE_PLAIN_END)*";
9810smy $RE_PLAIN_FIRST_WORD = "(?:[:?-]+$RE_PLAIN_END|$RE_PLAIN_FIRST)(?::+$RE_PLAIN_END|$RE_PLAIN_END)*";
9913µsmy $RE_PLAIN_WORDS = "(?:$RE_PLAIN_FIRST_WORD(?:$RE_WS+$RE_PLAIN_WORD)*)";
10011µsmy $RE_PLAIN_WORDS2 = "(?:$RE_PLAIN_WORD(?:$RE_WS+$RE_PLAIN_WORD)*)";
101
10211µsmy $RE_PLAIN_WORD_FLOW = "(?::+$RE_PLAIN_END_FLOW|$RE_PLAIN_START_FLOW)(?::+$RE_PLAIN_END_FLOW|$RE_PLAIN_END_FLOW)*";
10311µsmy $RE_PLAIN_FIRST_WORD_FLOW = "(?:[:?-]+$RE_PLAIN_END_FLOW|$RE_PLAIN_FIRST_FLOW)(?::+$RE_PLAIN_END_FLOW|$RE_PLAIN_END_FLOW)*";
10410smy $RE_PLAIN_WORDS_FLOW = "(?:$RE_PLAIN_FIRST_WORD_FLOW(?:$RE_WS+$RE_PLAIN_WORD_FLOW)*)";
10512µsmy $RE_PLAIN_WORDS_FLOW2 = "(?:$RE_PLAIN_WORD_FLOW(?:$RE_WS+$RE_PLAIN_WORD_FLOW)*)";
106
107
108#c-secondary-tag-handle ::= “!” “!”
109#c-named-tag-handle ::= “!” ns-word-char+ “!”
110#ns-tag-char ::= ns-uri-char - “!” - c-flow-indicator
111#ns-global-tag-prefix ::= ns-tag-char ns-uri-char*
112#c-ns-local-tag-prefix ::= “!” ns-uri-char*
11311µsmy $RE_TAG = "!(?:$RE_NS_WORD_CHAR*!$RE_NS_TAG_CHAR+|$RE_NS_TAG_CHAR+|<$RE_URI_CHAR+>|)";
114
115#c-ns-anchor-property ::= “&” ns-anchor-name
116#ns-char ::= nb-char - s-white
117#ns-anchor-char ::= ns-char - c-flow-indicator
118#ns-anchor-name ::= ns-anchor-char+
119
120119µs214µsmy $RE_SEQSTART = qr/\A(-)(?=$RE_WS|$)/m;
# spent 13µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 1µs making 1 call to YAML::PP::Lexer::CORE:qr
121117µs210µsmy $RE_COMPLEX = qr/(\?)(?=$RE_WS|$)/m;
# spent 9µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 1µs making 1 call to YAML::PP::Lexer::CORE:qr
122113µs29µsmy $RE_COMPLEXCOLON = qr/\A(:)(?=$RE_WS|$)/m;
# spent 8µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 1µs making 1 call to YAML::PP::Lexer::CORE:qr
12311µsmy $RE_ANCHOR = "&$RE_ANCHOR_CAR+";
12411µsmy $RE_ALIAS = "\\*$RE_ANCHOR_CAR+";
125
126
1271238µs7176µsmy %REGEXES = (
# spent 171µs making 3 calls to YAML::PP::Lexer::CORE:regcomp, avg 57µs/call # spent 5µs making 4 calls to YAML::PP::Lexer::CORE:qr, avg 1µs/call
128 ANCHOR => qr{($RE_ANCHOR)},
129 TAG => qr{($RE_TAG)},
130 ALIAS => qr{($RE_ALIAS)},
131 SINGLEQUOTED => qr{(?:''|[^'\r\n]+)*},
132);
133
134
# spent 379ms (235+144) within YAML::PP::Lexer::_fetch_next_line which was called 18497 times, avg 20µs/call: # 13451 times (153ms+96.5ms) by YAML::PP::Lexer::fetch_next_tokens at line 185, avg 19µs/call # 5040 times (81.2ms+47.9ms) by YAML::PP::Lexer::fetch_plain at line 412, avg 26µs/call # 6 times (47µs+23µs) by YAML::PP::Lexer::fetch_block at line 562, avg 12µs/call
sub _fetch_next_line {
135184974.08ms my ($self) = @_;
1361849713.5ms184979.75ms my $next_line = $self->next_line;
# spent 9.75ms making 18497 calls to YAML::PP::Lexer::next_line, avg 527ns/call
1371849711.7ms if (defined $next_line ) {
138 return $next_line;
139 }
140
1411345627.7ms2691281.0ms my $line = $self->reader->readline;
# spent 73.4ms making 13456 calls to YAML::PP::Reader::File::readline, avg 5µs/call # spent 7.62ms making 13456 calls to YAML::PP::Lexer::reader, avg 567ns/call
142134563.31ms unless (defined $line) {
14311µs11µs $self->set_next_line(undef);
# spent 1µs making 1 call to YAML::PP::Lexer::set_next_line
14412µs return;
145 }
1461345511.9ms134559.49ms $self->set_block(1);
# spent 9.49ms making 13455 calls to YAML::PP::Lexer::set_block, avg 706ns/call
1471345511.4ms134558.63ms $self->inc_line;
# spent 8.63ms making 13455 calls to YAML::PP::Lexer::inc_line, avg 641ns/call
1481345548.3ms1345527.2ms $line =~ m/\A( *)([^\r\n]*)([\r\n]|\z)/ or die "Unexpected";
# spent 27.2ms making 13455 calls to YAML::PP::Lexer::CORE:match, avg 2µs/call
1491345524.8ms $next_line = [ $1, $2, $3 ];
1501345511.0ms134558.34ms $self->set_next_line($next_line);
# spent 8.34ms making 13455 calls to YAML::PP::Lexer::set_next_line, avg 620ns/call
151 # $ESCAPE_CHAR from YAML.pm
152134558.38ms if ($line =~ tr/\x00-\x08\x0b-\x0c\x0e-\x1f//) {
153 $self->exception("Control characters are not allowed");
154 }
155
1561345527.9ms return $next_line;
157}
158
159114µsmy %TOKEN_NAMES = (
160 '"' => 'DOUBLEQUOTE',
161 "'" => 'SINGLEQUOTE',
162 '|' => 'LITERAL',
163 '>' => 'FOLDED',
164 '!' => 'TAG',
165 '*' => 'ALIAS',
166 '&' => 'ANCHOR',
167 ':' => 'COLON',
168 '-' => 'DASH',
169 '?' => 'QUESTION',
170 '[' => 'FLOWSEQ_START',
171 ']' => 'FLOWSEQ_END',
172 '{' => 'FLOWMAP_START',
173 '}' => 'FLOWMAP_END',
174 ',' => 'FLOW_COMMA',
175 '---' => 'DOC_START',
176 '...' => 'DOC_END',
177);
178
179
180
# spent 1.03s (223ms+804ms) within YAML::PP::Lexer::fetch_next_tokens which was called 13451 times, avg 76µs/call: # 13451 times (223ms+804ms) by YAML::PP::Parser::lex_next_tokens at line 179 of YAML/PP/Parser.pm, avg 76µs/call
sub fetch_next_tokens {
181134513.78ms my ($self) = @_;
1821345111.3ms134516.72ms my $next = $self->next_tokens;
# spent 6.72ms making 13451 calls to YAML::PP::Lexer::next_tokens, avg 499ns/call
183134513.36ms return $next if @$next;
184
1851345114.5ms13451250ms my $next_line = $self->_fetch_next_line;
# spent 250ms making 13451 calls to YAML::PP::Lexer::_fetch_next_line, avg 19µs/call
186134512.83ms if (not $next_line) {
187 return [];
188 }
189
190134504.98ms my $spaces = $next_line->[0];
191134504.63ms my $yaml = \$next_line->[1];
192134504.25ms if (not length $$yaml) {
193 $self->_push_tokens([ EOL => join('', @$next_line), $self->line ]);
194 $self->set_next_line(undef);
195 return $next;
196 }
1971345014.1ms if (substr($$yaml, 0, 1) eq '#') {
198 $self->_push_tokens([ EOL => join('', @$next_line), $self->line ]);
199 $self->set_next_line(undef);
200 return $next;
201 }
202134503.20ms if (not $spaces and substr($$yaml, 0, 1) eq "%") {
203 $self->_fetch_next_tokens_directive($yaml, $next_line->[2]);
204 $self->set_context(0);
205 $self->set_next_line(undef);
206 return $next;
207 }
2081345021.9ms134637.70ms if (not $spaces and $$yaml =~ s/\A(---|\.\.\.)(?=$RE_WS|\z)//) {
# spent 7.62ms making 13449 calls to YAML::PP::Lexer::flowcontext, avg 566ns/call # spent 39µs making 6 calls to YAML::PP::Lexer::CORE:regcomp, avg 6µs/call # spent 35µs making 1 call to YAML::PP::Lexer::_push_tokens # spent 7µs making 6 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call # spent 3µs making 1 call to YAML::PP::Lexer::line
209 $self->_push_tokens([ $TOKEN_NAMES{ $1 } => $1, $self->line ]);
210 }
211 elsif ($self->flowcontext and $$yaml =~ m/\A[ \t]+(#.*)?\z/) {
212 $self->_push_tokens([ EOL => join('', @$next_line), $self->line ]);
213 $self->set_next_line(undef);
214 return $next;
215 }
216 else {
2171344925.5ms26898185ms $self->_push_tokens([ SPACE => $spaces, $self->line ]);
# spent 178ms making 13449 calls to YAML::PP::Lexer::_push_tokens, avg 13µs/call # spent 6.76ms making 13449 calls to YAML::PP::Lexer::line, avg 503ns/call
218 }
219
2201345013.3ms13450355ms my $partial = $self->_fetch_next_tokens($next_line);
# spent 355ms making 13450 calls to YAML::PP::Lexer::_fetch_next_tokens, avg 26µs/call
221134502.08ms11µs unless ($partial) {
# spent 1µs making 1 call to YAML::PP::Lexer::set_next_line
222 $self->set_next_line(undef);
223 }
2241345024.4ms return $next;
225}
226
22711µsmy %ANCHOR_ALIAS_TAG = ( '&' => 1, '*' => 1, '!' => 1 );
22810smy %BLOCK_SCALAR = ( '|' => 1, '>' => 1 );
22911µsmy %COLON_DASH_QUESTION = ( ':' => 1, '-' => 1, '?' => 1 );
23011µsmy %QUOTED = ( '"' => 1, "'" => 1 );
23111µsmy %FLOW = ( '{' => 1, '[' => 1, '}' => 1, ']' => 1, ',' => 1 );
23211µsmy %CONTEXT = ( '"' => 1, "'" => 1, '>' => 1, '|' => 1 );
233
23419µs15µsmy $RE_ESCAPES = qr{(?:
# spent 5µs making 1 call to YAML::PP::Lexer::CORE:qr
235 \\([ \\\/_0abefnrtvLNP\t"]) | \\x([0-9a-fA-F]{2})
236 | \\u([A-Fa-f0-9]{4}) | \\U([A-Fa-f0-9]{4,8})
237)}x;
238116µsmy %CONTROL = (
239 '\\' => '\\', '/' => '/', n => "\n", t => "\t", r => "\r", b => "\b",
240 'a' => "\a", 'b' => "\b", 'e' => "\e", 'f' => "\f", 'v' => "\x0b", "\t" => "\t",
241 'P' => "\x{2029}", L => "\x{2028}", 'N' => "\x85",
242 '0' => "\0", '_' => "\xa0", ' ' => ' ', q/"/ => q/"/,
243);
244
245
# spent 1.22s (539ms+679ms) within YAML::PP::Lexer::_fetch_next_tokens which was called 27926 times, avg 44µs/call: # 13844 times (374ms+358ms) by YAML::PP::Lexer::fetch_plain at line 397, avg 53µs/call # 13450 times (149ms+205ms) by YAML::PP::Lexer::fetch_next_tokens at line 220, avg 26µs/call # 632 times (15.2ms+116ms) by YAML::PP::Lexer::fetch_quoted at line 696, avg 207µs/call
sub _fetch_next_tokens {
246 TRACE and warn __PACKAGE__.':'.__LINE__.": _fetch_next_tokens\n";
247279265.84ms my ($self, $next_line) = @_;
248
249279268.34ms my $yaml = \$next_line->[1];
250279265.86ms my $eol = $next_line->[2];
251
252279263.21ms my @tokens;
253
254279263.92ms while (1) {
255380047.83ms unless (length $$yaml) {
256529582µs529244µs push @tokens, ( EOL => $eol, $self->line );
# spent 244µs making 529 calls to YAML::PP::Lexer::line, avg 461ns/call
257529439µs5299.89ms $self->_push_tokens(\@tokens);
# spent 9.89ms making 529 calls to YAML::PP::Lexer::_push_tokens, avg 19µs/call
2585291.33ms return;
259 }
2603747516.1ms my $first = substr($$yaml, 0, 1);
261374754.76ms my $plain = 0;
262
2633747526.8ms3747520.1ms if ($self->context) {
# spent 20.1ms making 37475 calls to YAML::PP::Lexer::context, avg 537ns/call
26488351µs176169µs if ($$yaml =~ s/\A($RE_WS*)://) {
# spent 122µs making 88 calls to YAML::PP::Lexer::CORE:regcomp, avg 1µs/call # spent 47µs making 88 calls to YAML::PP::Lexer::CORE:subst, avg 534ns/call
265 push @tokens, ( WS => $1, $self->line ) if $1;
266 push @tokens, ( COLON => ':', $self->line );
267 $self->set_context(0);
268 next;
269 }
27088377µs176148µs if ($$yaml =~ s/\A($RE_WS*(?: #.*))\z//) {
# spent 119µs making 88 calls to YAML::PP::Lexer::CORE:regcomp, avg 1µs/call # spent 29µs making 88 calls to YAML::PP::Lexer::CORE:subst, avg 330ns/call
271 push @tokens, ( EOL => $1 . $eol, $self->line );
272 $self->_push_tokens(\@tokens);
273 return;
274 }
2758893µs8842µs $self->set_context(0);
# spent 42µs making 88 calls to YAML::PP::Lexer::set_context, avg 477ns/call
276 }
2773747533.1ms if ($CONTEXT{ $first }) {
27820573.21ms20571.01ms push @tokens, ( CONTEXT => $first, $self->line );
# spent 1.01ms making 2057 calls to YAML::PP::Lexer::line, avg 490ns/call
27920572.20ms205734.2ms $self->_push_tokens(\@tokens);
# spent 34.2ms making 2057 calls to YAML::PP::Lexer::_push_tokens, avg 17µs/call
28020574.97ms return 1;
281 }
282 elsif ($COLON_DASH_QUESTION{ $first }) {
283140545.65ms my $token_name = $TOKEN_NAMES{ $first };
28414054111ms2810869.2ms if ($$yaml =~ s/\A\Q$first\E($RE_WS+|\z)//) {
# spent 41.3ms making 14054 calls to YAML::PP::Lexer::CORE:regcomp, avg 3µs/call # spent 27.9ms making 14054 calls to YAML::PP::Lexer::CORE:subst, avg 2µs/call
285140545.92ms my $after = $1;
2861405422.7ms2807916.3ms if (not $self->flowcontext and not $self->block) {
# spent 8.34ms making 14025 calls to YAML::PP::Lexer::block, avg 594ns/call # spent 7.92ms making 14054 calls to YAML::PP::Lexer::flowcontext, avg 564ns/call
287 push @tokens, ERROR => $first . $after, $self->line;
288 $self->_push_tokens(\@tokens);
289 $self->exception("Tabs can not be used for indentation");
290 }
291140546.20ms if ($after =~ tr/\t//) {
292 $self->set_block(0);
293 }
294140544.31ms my $token_name = $TOKEN_NAMES{ $first };
2951405417.9ms140545.90ms push @tokens, ( $token_name => $first, $self->line );
# spent 5.90ms making 14054 calls to YAML::PP::Lexer::line, avg 420ns/call
296140545.01ms if (not defined $1) {
297 push @tokens, ( EOL => $eol, $self->line );
298 $self->_push_tokens(\@tokens);
299 return;
300 }
301140544.46ms my $ws = $1;
3021405441.5ms1405418.3ms if ($$yaml =~ s/\A(#.*|)\z//) {
# spent 18.3ms making 14054 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call
303645613.3ms64563.49ms push @tokens, ( EOL => $ws . $1 . $eol, $self->line );
# spent 3.49ms making 6456 calls to YAML::PP::Lexer::line, avg 541ns/call
30464565.18ms6456201ms $self->_push_tokens(\@tokens);
# spent 201ms making 6456 calls to YAML::PP::Lexer::_push_tokens, avg 31µs/call
305645621.3ms return;
306 }
30775989.99ms75983.94ms push @tokens, ( WS => $ws, $self->line );
# spent 3.94ms making 7598 calls to YAML::PP::Lexer::line, avg 519ns/call
30875988.62ms next;
309 }
310 elsif ($self->flowcontext and $$yaml =~ s/\A:(?=[,\{\}\[\]])//) {
311 push @tokens, ( $token_name => $first, $self->line );
312 next;
313 }
314 $plain = 1;
315 }
316 elsif ($ANCHOR_ALIAS_TAG{ $first }) {
317 my $token_name = $TOKEN_NAMES{ $first };
318 my $REGEX = $REGEXES{ $token_name };
319 if ($$yaml =~ s/\A$REGEX//) {
320 push @tokens, ( $token_name => $1, $self->line );
321 }
322 else {
323 push @tokens, ( "Invalid $token_name" => $$yaml, $self->line );
324 $self->_push_tokens(\@tokens);
325 return;
326 }
327 }
328 elsif ($first eq ' ' or $first eq "\t") {
3296894.71ms13781.65ms if ($$yaml =~ s/\A($RE_WS+)//) {
# spent 1.00ms making 689 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call # spent 651µs making 689 calls to YAML::PP::Lexer::CORE:regcomp, avg 945ns/call
330689462µs my $ws = $1;
3316891.77ms689825µs if ($$yaml =~ s/\A((?:#.*)?\z)//) {
# spent 825µs making 689 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call
332 push @tokens, ( EOL => $ws . $1 . $eol, $self->line );
333 $self->_push_tokens(\@tokens);
334 return;
335 }
3366891.18ms689656µs push @tokens, ( WS => $ws, $self->line );
# spent 656µs making 689 calls to YAML::PP::Lexer::line, avg 952ns/call
337 }
338 }
339 elsif ($FLOW{ $first }) {
34017912.40ms1791729µs push @tokens, ( $TOKEN_NAMES{ $first } => $first, $self->line );
# spent 729µs making 1791 calls to YAML::PP::Lexer::line, avg 407ns/call
34117911.92ms substr($$yaml, 0, 1, '');
34217911.31ms1791762µs my $flowcontext = $self->flowcontext;
# spent 762µs making 1791 calls to YAML::PP::Lexer::flowcontext, avg 425ns/call
34317912.49ms1102990µs if ($first eq '{' or $first eq '[') {
# spent 990µs making 1102 calls to YAML::PP::Lexer::set_flowcontext, avg 898ns/call
344 $self->set_flowcontext(++$flowcontext);
345 }
346 elsif ($first eq '}' or $first eq ']') {
347 $self->set_flowcontext(--$flowcontext);
348 }
349 }
350 else {
351188843.00ms $plain = 1;
352 }
353
354213643.92ms if ($plain) {
3551888417.6ms188848.15ms push @tokens, ( CONTEXT => '', $self->line );
# spent 8.15ms making 18884 calls to YAML::PP::Lexer::line, avg 432ns/call
3561888413.4ms18884282ms $self->_push_tokens(\@tokens);
# spent 282ms making 18884 calls to YAML::PP::Lexer::_push_tokens, avg 15µs/call
3571888441.8ms return 1;
358 }
359
360 }
361
362 return;
363}
364
365
# spent 1.93s (469ms+1.46) within YAML::PP::Lexer::fetch_plain which was called 18884 times, avg 102µs/call: # 18884 times (469ms+1.46s) by YAML::PP::Parser::parse_tokens at line 381 of YAML/PP/Parser.pm, avg 102µs/call
sub fetch_plain {
366188847.50ms my ($self, $indent, $context) = @_;
3671888415.8ms1888411.1ms my $next_line = $self->next_line;
# spent 11.1ms making 18884 calls to YAML::PP::Lexer::next_line, avg 590ns/call
368188847.20ms my $yaml = \$next_line->[1];
369188844.51ms my $eol = $next_line->[2];
370188844.12ms my $REGEX = $RE_PLAIN_WORDS;
3711888411.3ms188847.68ms if ($self->flowcontext) {
# spent 7.68ms making 18884 calls to YAML::PP::Lexer::flowcontext, avg 407ns/call
372 $REGEX = $RE_PLAIN_WORDS_FLOW;
373 }
374
375188843.32ms my @tokens;
37618884307ms37768243ms unless ($$yaml =~ s/\A($REGEX)//) {
# spent 136ms making 18884 calls to YAML::PP::Lexer::CORE:regcomp, avg 7µs/call # spent 107ms making 18884 calls to YAML::PP::Lexer::CORE:subst, avg 6µs/call
377 $self->_push_tokens(\@tokens);
378 $self->exception("Invalid plain scalar");
379 }
3801888412.4ms my $plain = $1;
3811888423.3ms1888411.5ms push @tokens, ( PLAIN => $plain, $self->line );
# spent 11.5ms making 18884 calls to YAML::PP::Lexer::line, avg 607ns/call
382
38318884100ms3776844.7ms if ($$yaml =~ s/\A(?:($RE_WS+#.*)|($RE_WS*))\z//) {
# spent 25.8ms making 18884 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call # spent 18.9ms making 18884 calls to YAML::PP::Lexer::CORE:regcomp, avg 1µs/call
38450403.21ms if (defined $1) {
385 push @tokens, ( EOL => $1 . $eol, $self->line );
386 $self->_push_tokens(\@tokens);
387 $self->set_next_line(undef);
388 return;
389 }
390 else {
39150408.55ms50402.76ms push @tokens, ( EOL => $2. $eol, $self->line );
# spent 2.76ms making 5040 calls to YAML::PP::Lexer::line, avg 548ns/call
39250405.40ms50403.85ms $self->set_next_line(undef);
# spent 3.85ms making 5040 calls to YAML::PP::Lexer::set_next_line, avg 765ns/call
393 }
394 }
395 else {
3961384411.7ms13844184ms $self->_push_tokens(\@tokens);
# spent 184ms making 13844 calls to YAML::PP::Lexer::_push_tokens, avg 13µs/call
3971384413.2ms13844732ms my $partial = $self->_fetch_next_tokens($next_line);
# spent 732ms making 13844 calls to YAML::PP::Lexer::_fetch_next_tokens, avg 53µs/call
398138447.81ms63865.20ms if (not $partial) {
# spent 5.20ms making 6386 calls to YAML::PP::Lexer::set_next_line, avg 814ns/call
399 $self->set_next_line(undef);
400 }
4011384444.9ms return;
402 }
403
40450401.73ms my $RE2 = $RE_PLAIN_WORDS2;
40550403.64ms50402.21ms if ($self->flowcontext) {
# spent 2.21ms making 5040 calls to YAML::PP::Lexer::flowcontext, avg 438ns/call
406 $RE2 = $RE_PLAIN_WORDS_FLOW2;
407 }
4085040808µs my $fetch_next = 0;
40950402.99ms my @lines = ($plain);
4105040838µs my @next;
4115040881µs LOOP: while (1) {
41250408.69ms5040129ms $next_line = $self->_fetch_next_line;
# spent 129ms making 5040 calls to YAML::PP::Lexer::_fetch_next_line, avg 26µs/call
41350401.11ms if (not $next_line) {
414 last LOOP;
415 }
41650402.42ms my $spaces = $next_line->[0];
41750401.99ms my $yaml = \$next_line->[1];
41850401.70ms my $eol = $next_line->[2];
419
42050401.84ms if (not length $$yaml) {
421 push @tokens, ( EOL => $spaces . $eol, $self->line );
422 $self->set_next_line(undef);
423 push @lines, '';
424 next LOOP;
425 }
426
42750401.68ms623µs if (not $spaces and $$yaml =~ s/\A(---|\.\.\.)(?=$RE_WS|\z)//) {
# spent 22µs making 3 calls to YAML::PP::Lexer::CORE:regcomp, avg 7µs/call # spent 1µs making 3 calls to YAML::PP::Lexer::CORE:subst, avg 333ns/call
428 push @next, $TOKEN_NAMES{ $1 } => $1, $self->line;
429 $fetch_next = 1;
430 last LOOP;
431 }
43250403.56ms if ((length $spaces) < $indent) {
43350404.53ms last LOOP;
434 }
435
436 my $ws = '';
437 if ($$yaml =~ s/\A($RE_WS+)//) {
438 $ws = $1;
439 }
440 if (not length $$yaml) {
441 push @tokens, ( EOL => $spaces . $ws . $eol, $self->line );
442 $self->set_next_line(undef);
443 push @lines, '';
444 next LOOP;
445 }
446 if ($$yaml =~ s/\A(#.*)\z//) {
447 push @tokens, ( EOL => $spaces . $ws . $1 . $eol, $self->line );
448 $self->set_next_line(undef);
449 last LOOP;
450 }
451
452 if ($$yaml =~ s/\A($RE2)//) {
453 push @tokens, INDENT => $spaces, $self->line;
454 push @tokens, WS => $ws, $self->line;
455 push @tokens, PLAIN => $1, $self->line;
456 push @lines, $1;
457 my $ws = '';
458 if ($$yaml =~ s/\A($RE_WS+)//) {
459 $ws = $1;
460 }
461 if (not length $$yaml) {
462 push @tokens, EOL => $ws . $eol, $self->line;
463 $self->set_next_line(undef);
464 next LOOP;
465 }
466
467 if ($$yaml =~ s/\A(#.*)\z//) {
468 push @tokens, EOL => $ws . $1 . $eol, $self->line;
469 $self->set_next_line(undef);
470 last LOOP;
471 }
472 else {
473 push @tokens, WS => $ws, $self->line if $ws;
474 $fetch_next = 1;
475 }
476 }
477 else {
478 push @tokens, SPACE => $spaces, $self->line;
479 push @tokens, WS => $ws, $self->line;
480 if ($self->flowcontext) {
481 $fetch_next = 1;
482 }
483 else {
484 push @tokens, ERROR => $$yaml, $self->line;
485 }
486 }
487
488 last LOOP;
489
490 }
491 # remove empty lines at the end
49250403.55ms while (@lines > 1 and $lines[-1] eq '') {
493 pop @lines;
494 }
49550405.57ms if (@lines > 1) {
496 my $value = YAML::PP::Render->render_multi_val(\@lines);
497 my @eol;
498 if ($tokens[-3] eq 'EOL') {
499 @eol = splice @tokens, -3;
500 }
501 $self->push_subtokens( { name => 'PLAIN_MULTI', value => $value }, \@tokens);
502 $self->_push_tokens([ @eol, @next ]);
503 }
504 else {
50550409.13ms504086.7ms $self->_push_tokens([ @tokens, @next ]);
# spent 86.7ms making 5040 calls to YAML::PP::Lexer::_push_tokens, avg 17µs/call
506 }
50750403.98ms @tokens = ();
50850401.30ms if ($fetch_next) {
509 my $partial = $self->_fetch_next_tokens($next_line);
510 if (not $partial) {
511 $self->set_next_line(undef);
512 }
513 }
514504015.6ms return;
515}
516
517
# spent 320µs (149+171) within YAML::PP::Lexer::fetch_block which was called: # once (149µs+171µs) by YAML::PP::Parser::parse_tokens at line 381 of YAML/PP/Parser.pm
sub fetch_block {
51811µs my ($self, $indent, $context) = @_;
51911µs11µs my $next_line = $self->next_line;
# spent 1µs making 1 call to YAML::PP::Lexer::next_line
52011µs my $yaml = \$next_line->[1];
52111µs my $eol = $next_line->[2];
522
52310s my @tokens;
52411µs my $token_name = $TOKEN_NAMES{ $context };
525118µs216µs $$yaml =~ s/\A\Q$context\E// or die "Unexpected";
# spent 13µs making 1 call to YAML::PP::Lexer::CORE:regcomp # spent 3µs making 1 call to YAML::PP::Lexer::CORE:subst
52611µs10s push @tokens, ( $token_name => $context, $self->line );
# spent 0s making 1 call to YAML::PP::Lexer::line
52710s my $current_indent = $indent;
52811µs my $started = 0;
52910s my $set_indent = 0;
53010s my $chomp = '';
53115µs22µs if ($$yaml =~ s/\A([1-9])([+-]?)//) {
# spent 2µs making 2 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call
532 push @tokens, ( BLOCK_SCALAR_INDENT => $1, $self->line );
533 $set_indent = $1;
534 $chomp = $2 if $2;
535 push @tokens, ( BLOCK_SCALAR_CHOMP => $2, $self->line ) if $2;
536 }
537 elsif ($$yaml =~ s/\A([+-])([1-9])?//) {
53812µs11µs push @tokens, ( BLOCK_SCALAR_CHOMP => $1, $self->line );
# spent 1µs making 1 call to YAML::PP::Lexer::line
53910s $chomp = $1;
54010s push @tokens, ( BLOCK_SCALAR_INDENT => $2, $self->line ) if $2;
54110s $set_indent = $2 if $2;
542 }
54311µs if ($set_indent) {
544 $started = 1;
545 $indent-- if $indent > 0;
546 $current_indent = $indent + $set_indent;
547 }
54812µs11µs if (not length $$yaml) {
# spent 1µs making 1 call to YAML::PP::Lexer::line
549 push @tokens, ( EOL => $eol, $self->line );
550 }
551 elsif ($$yaml =~ s/\A($RE_WS*(?:$RE_WS#.*|))\z//) {
552 push @tokens, ( EOL => $1 . $eol, $self->line );
553 }
554 else {
555 $self->_push_tokens(\@tokens);
556 $self->exception("Invalid block scalar");
557 }
558
55910s my @lines;
56010s while (1) {
56162µs60s $self->set_next_line(undef);
# spent 0s making 6 calls to YAML::PP::Lexer::set_next_line, avg 0s/call
56264µs670µs $next_line = $self->_fetch_next_line;
# spent 70µs making 6 calls to YAML::PP::Lexer::_fetch_next_line, avg 12µs/call
56361µs if (not $next_line) {
564 last;
565 }
56660s my $spaces = $next_line->[0];
56762µs my $content = $next_line->[1];
56861µs my $eol = $next_line->[2];
56961µs if (not $spaces and $content =~ m/\A(---|\.\.\.)(?=$RE_WS|\z)/) {
570 last;
571 }
57262µs if ((length $spaces) < $current_indent) {
57310s if (length $content) {
57413µs11µs if ($content =~ m/\A\t/) {
# spent 1µs making 1 call to YAML::PP::Lexer::CORE:match
575 $self->_push_tokens(\@tokens);
576 $self->exception("Invalid block scalar");
577 }
57811µs last;
579 }
580 else {
581 push @lines, '';
582 push @tokens, ( EOL => $spaces . $eol, $self->line );
583 next;
584 }
585 }
58651µs if ((length $spaces) > $current_indent) {
58710s if ($started) {
588 ($spaces, my $more_spaces) = unpack "a${current_indent}a*", $spaces;
589 $content = $more_spaces . $content;
590 }
591 }
59251µs unless (length $content) {
593 push @lines, '';
594 push @tokens, ( INDENT => $spaces, $self->line, EOL => $eol, $self->line );
595 unless ($started) {
596 $current_indent = length $spaces;
597 }
598 next;
599 }
60050s unless ($started) {
60110s $started = 1;
60210s $current_indent = length $spaces;
603 }
604526µs push @lines, $content;
605513µs155µs push @tokens, (
# spent 5µs making 15 calls to YAML::PP::Lexer::line, avg 333ns/call
606 INDENT => $spaces, $self->line,
607 BLOCK_SCALAR_CONTENT => $content, $self->line,
608 EOL => $eol, $self->line,
609 );
610 }
61116µs111µs my $value = YAML::PP::Render->render_block_scalar($context, $chomp, \@lines);
# spent 11µs making 1 call to YAML::PP::Render::render_block_scalar
61211µs my @eol = splice @tokens, -3;
61311µs154µs $self->push_subtokens( { name => 'BLOCK_SCALAR', value => $value }, \@tokens );
# spent 54µs making 1 call to YAML::PP::Lexer::push_subtokens
61412µs19µs $self->_push_tokens([ @eol ]);
# spent 9µs making 1 call to YAML::PP::Lexer::_push_tokens
61515µs return 0;
616}
617
618
# spent 357ms (69.0+288) within YAML::PP::Lexer::fetch_quoted which was called 2056 times, avg 174µs/call: # 2056 times (69.0ms+288ms) by YAML::PP::Parser::parse_tokens at line 381 of YAML/PP/Parser.pm, avg 174µs/call
sub fetch_quoted {
61920561.26ms my ($self, $indent, $context) = @_;
62020562.41ms20561.31ms my $next_line = $self->next_line;
# spent 1.31ms making 2056 calls to YAML::PP::Lexer::next_line, avg 639ns/call
62120561.29ms my $yaml = \$next_line->[1];
62220561.32ms my $spaces = $next_line->[0];
623
62420561.31ms my $token_name = $TOKEN_NAMES{ $context };
625205615.1ms41127.03ms $$yaml =~ s/\A\Q$context// or die "Unexpected";;
# spent 5.46ms making 2056 calls to YAML::PP::Lexer::CORE:subst, avg 3µs/call # spent 1.57ms making 2056 calls to YAML::PP::Lexer::CORE:regcomp, avg 763ns/call
62620564.02ms20561.15ms my @tokens = ( $token_name => $context, $self->line );
# spent 1.15ms making 2056 calls to YAML::PP::Lexer::line, avg 559ns/call
627
6282056535µs my $start = 1;
6292056530µs my @values;
6302056471µs while (1) {
631
6322056530µs unless ($start) {
633 $next_line = $self->_fetch_next_line or do {
634 for (my $i = 0; $i < @tokens; $i+= 3) {
635 my $token = $tokens[ $i + 1 ];
636 if (ref $token) {
637 $tokens[ $i + 1 ] = $token->{orig};
638 }
639 }
640 $self->_push_tokens(\@tokens);
641 $self->exception("Missing closing quote <$context> at EOF");
642 };
643 $start = 0;
644 $spaces = $next_line->[0];
645 $yaml = \$next_line->[1];
646
647 if (not length $$yaml) {
648 push @tokens, ( EOL => $spaces . $next_line->[2], $self->line );
649 $self->set_next_line(undef);
650 push @values, { value => '', orig => '' };
651 next;
652 }
653 elsif (not $spaces and $$yaml =~ m/\A(---|\.\.\.)(?=$RE_WS|\z)/) {
654 for (my $i = 0; $i < @tokens; $i+= 3) {
655 my $token = $tokens[ $i + 1 ];
656 if (ref $token) {
657 $tokens[ $i + 1 ] = $token->{orig};
658 }
659 }
660 $self->_push_tokens(\@tokens);
661 $self->exception("Missing closing quote <$context> or invalid document marker");
662 }
663 elsif ((length $spaces) < $indent) {
664 for (my $i = 0; $i < @tokens; $i+= 3) {
665 my $token = $tokens[ $i + 1 ];
666 if (ref $token) {
667 $tokens[ $i + 1 ] = $token->{orig};
668 }
669 }
670 $self->_push_tokens(\@tokens);
671 $self->exception("Wrong indendation or missing closing quote <$context>");
672 }
673
674 if ($$yaml =~ s/\A($RE_WS+)//) {
675 $spaces .= $1;
676 }
677 push @tokens, ( WS => $spaces, $self->line );
678 }
679
68020564.72ms205661.3ms my $v = $self->_read_quoted_tokens($start, $context, $yaml, \@tokens);
# spent 61.3ms making 2056 calls to YAML::PP::Lexer::_read_quoted_tokens, avg 30µs/call
6812056589µs push @values, $v;
6822056992µs if ($tokens[-3] eq $token_name) {
68320567.03ms205664.2ms if ($start) {
# spent 64.2ms making 2056 calls to YAML::PP::Lexer::push_subtokens, avg 31µs/call
684 $self->push_subtokens(
685 { name => 'QUOTED', value => $v->{value} }, \@tokens
686 );
687 }
688 else {
689 my $value = YAML::PP::Render->render_quoted($context, \@values);
690 $self->push_subtokens(
691 { name => 'QUOTED_MULTILINE', value => $value }, \@tokens
692 );
693 }
69420562.04ms21441.07ms $self->set_context(1) if $self->flowcontext;
# spent 1.01ms making 2056 calls to YAML::PP::Lexer::flowcontext, avg 490ns/call # spent 64µs making 88 calls to YAML::PP::Lexer::set_context, avg 727ns/call
6952056701µs if (length $$yaml) {
696632740µs632131ms my $partial = $self->_fetch_next_tokens($next_line);
# spent 131ms making 632 calls to YAML::PP::Lexer::_fetch_next_tokens, avg 207µs/call
697632694µs598460µs if (not $partial) {
# spent 460µs making 598 calls to YAML::PP::Lexer::set_next_line, avg 769ns/call
698 $self->set_next_line(undef);
699 }
7006323.50ms return 0;
701 }
702 else {
70314241.42ms @tokens = ();
70414242.07ms1424660µs push @tokens, ( EOL => $next_line->[2], $self->line );
# spent 660µs making 1424 calls to YAML::PP::Lexer::line, avg 463ns/call
70514241.24ms142418.7ms $self->_push_tokens(\@tokens);
# spent 18.7ms making 1424 calls to YAML::PP::Lexer::_push_tokens, avg 13µs/call
70614241.39ms14241.02ms $self->set_next_line(undef);
# spent 1.02ms making 1424 calls to YAML::PP::Lexer::set_next_line, avg 716ns/call
70714246.80ms return;
708 }
709 }
710 $tokens[-2] .= $next_line->[2];
711 $self->set_next_line(undef);
712 $start = 0;
713 }
714}
715
716
# spent 61.3ms (46.0+15.3) within YAML::PP::Lexer::_read_quoted_tokens which was called 2056 times, avg 30µs/call: # 2056 times (46.0ms+15.3ms) by YAML::PP::Lexer::fetch_quoted at line 680, avg 30µs/call
sub _read_quoted_tokens {
71720561.14ms my ($self, $start, $first, $yaml, $tokens) = @_;
7182056955µs my $quoted = '';
7192056746µs my $decoded = '';
72020561.02ms my $token_name = $TOKEN_NAMES{ $first };
7212056563µs my $eol = '';
72220561.50ms if ($first eq "'") {
72320561.24ms my $regex = $REGEXES{SINGLEQUOTED};
724205615.7ms41127.86ms if ($$yaml =~ s/\A($regex)//) {
# spent 5.30ms making 2056 calls to YAML::PP::Lexer::CORE:subst, avg 3µs/call # spent 2.56ms making 2056 calls to YAML::PP::Lexer::CORE:regcomp, avg 1µs/call
72520563.10ms $quoted .= $1;
72620561.14ms $decoded .= $1;
72720564.10ms20561.69ms $decoded =~ s/''/'/g;
# spent 1.69ms making 2056 calls to YAML::PP::Lexer::CORE:subst, avg 820ns/call
728 }
72920561.60ms unless (length $$yaml) {
730 if ($quoted =~ s/($RE_WS+)\z//) {
731 $eol = $1;
732 $decoded =~ s/($eol)\z//;
733 }
734 }
735 }
736 else {
737 ($quoted, $decoded, $eol) = $self->_read_doublequoted($yaml);
738 }
73920563.85ms my $value = { value => $decoded, orig => $quoted };
740
74120569.00ms41123.38ms if ($$yaml =~ s/\A$first//) {
# spent 2.47ms making 2056 calls to YAML::PP::Lexer::CORE:subst, avg 1µs/call # spent 911µs making 2056 calls to YAML::PP::Lexer::CORE:regcomp, avg 443ns/call
74220563.88ms20561.39ms if ($start) {
# spent 1.39ms making 2056 calls to YAML::PP::Lexer::line, avg 675ns/call
743 push @$tokens, ( $token_name . 'D' => $value, $self->line );
744 }
745 else {
746 push @$tokens, ( $token_name . 'D_LINE' => $value, $self->line );
747 }
74820562.43ms2056950µs push @$tokens, ( $token_name => $first, $self->line );
# spent 950µs making 2056 calls to YAML::PP::Lexer::line, avg 462ns/call
74920566.03ms return $value;
750 }
751 if (length $$yaml) {
752 push @$tokens, ( $token_name . 'D' => $value->{orig}, $self->line );
753 $self->_push_tokens($tokens);
754 $self->exception("Invalid quoted <$first> string");
755 }
756
757 push @$tokens, ( $token_name . 'D_LINE' => $value, $self->line );
758 push @$tokens, ( EOL => $eol, $self->line );
759
760 return $value;
761}
762
763sub _read_doublequoted {
764 my ($self, $yaml) = @_;
765 my $quoted = '';
766 my $decoded = '';
767 my $eol = '';
768 while (1) {
769 my $last = 1;
770 if ($$yaml =~ s/\A([^"\\ \t]+)//) {
771 $quoted .= $1;
772 $decoded .= $1;
773 $last = 0;
774 }
775 if ($$yaml =~ s/\A($RE_ESCAPES)//) {
776 $quoted .= $1;
777 my $dec = defined $2 ? $CONTROL{ $2 }
778 : defined $3 ? chr hex $3
779 : defined $4 ? chr hex $4
780 : chr hex $5;
781 $decoded .= $dec;
782 $last = 0;
783 }
784 if ($$yaml =~ s/\A([ \t]+)//) {
785 my $spaces = $1;
786 if (length $$yaml) {
787 $quoted .= $spaces;
788 $decoded .= $spaces;
789 $last = 0;
790 }
791 else {
792 $eol = $spaces;
793 last;
794 }
795 }
796 if ($$yaml =~ s/\A(\\)\z//) {
797 $quoted .= $1;
798 $decoded .= $1;
799 last;
800 }
801 last if $last;
802 }
803 return ($quoted, $decoded, $eol);
804}
805
806sub _fetch_next_tokens_directive {
807 my ($self, $yaml, $eol) = @_;
808 my @tokens;
809
810 my $trailing_ws = '';
811 my $warn = $ENV{YAML_PP_RESERVED_DIRECTIVE} || 'warn';
812 if ($$yaml =~ s/\A(\s*%YAML[ \t]+([0-9]+\.[0-9]+))//) {
813 my $dir = $1;
814 my $version = $2;
815 if ($$yaml =~ s/\A($RE_WS+)//) {
816 $trailing_ws = $1;
817 }
818 elsif (length $$yaml) {
819 push @tokens, ( 'Invalid directive' => $dir.$$yaml.$eol, $self->line );
820 $self->_push_tokens(\@tokens);
821 return;
822 }
823 if ($version !~ m/^1\.[12]$/) {
824 if ($warn eq 'warn') {
825 warn "Unsupported YAML version '$dir'";
826 }
827 elsif ($warn eq 'fatal') {
828 push @tokens, ( 'Unsupported YAML version' => $dir, $self->line );
829 $self->_push_tokens(\@tokens);
830 return;
831 }
832 }
833 push @tokens, ( YAML_DIRECTIVE => $dir, $self->line );
834 }
835 elsif ($$yaml =~ s/\A(\s*%TAG[ \t]+(!$RE_NS_WORD_CHAR*!|!)[ \t]+(tag:\S+|!$RE_URI_CHAR+))($RE_WS*)//) {
836 push @tokens, ( TAG_DIRECTIVE => $1, $self->line );
837 # TODO
838 my $tag_alias = $2;
839 my $tag_url = $3;
840 $trailing_ws = $4;
841 }
842 elsif ($$yaml =~ s/\A(\s*\A%(?:\w+).*)//) {
843 push @tokens, ( RESERVED_DIRECTIVE => $1, $self->line );
844 if ($warn eq 'warn') {
845 warn "Found reserved directive '$1'";
846 }
847 elsif ($warn eq 'fatal') {
848 die "Found reserved directive '$1'";
849 }
850 }
851 else {
852 push @tokens, ( 'Invalid directive' => $$yaml, $self->line );
853 push @tokens, ( EOL => $eol, $self->line );
854 $self->_push_tokens(\@tokens);
855 return;
856 }
857 if (not length $$yaml) {
858 push @tokens, ( EOL => $eol, $self->line );
859 }
860 elsif ($trailing_ws and $$yaml =~ s/\A(#.*)?\z//) {
861 push @tokens, ( EOL => "$trailing_ws$1$eol", $self->line );
862 $self->_push_tokens(\@tokens);
863 return;
864 }
865 elsif ($$yaml =~ s/\A([ \t]+#.*)?\z//) {
866 push @tokens, ( EOL => "$1$eol", $self->line );
867 $self->_push_tokens(\@tokens);
868 return;
869 }
870 else {
871 push @tokens, ( 'Invalid directive' => $trailing_ws.$$yaml, $self->line );
872 push @tokens, ( EOL => $eol, $self->line );
873 }
874 $self->_push_tokens(\@tokens);
875 return;
876}
877
878
# spent 994ms (873+121) within YAML::PP::Lexer::_push_tokens which was called 61685 times, avg 16µs/call: # 18884 times (247ms+34.7ms) by YAML::PP::Lexer::_fetch_next_tokens at line 356, avg 15µs/call # 13844 times (154ms+29.4ms) by YAML::PP::Lexer::fetch_plain at line 396, avg 13µs/call # 13449 times (153ms+25.0ms) by YAML::PP::Lexer::fetch_next_tokens at line 217, avg 13µs/call # 6456 times (188ms+13.2ms) by YAML::PP::Lexer::_fetch_next_tokens at line 304, avg 31µs/call # 5040 times (75.4ms+11.3ms) by YAML::PP::Lexer::fetch_plain at line 505, avg 17µs/call # 2057 times (30.3ms+3.93ms) by YAML::PP::Lexer::_fetch_next_tokens at line 279, avg 17µs/call # 1424 times (16.2ms+2.50ms) by YAML::PP::Lexer::fetch_quoted at line 705, avg 13µs/call # 529 times (8.84ms+1.05ms) by YAML::PP::Lexer::_fetch_next_tokens at line 257, avg 19µs/call # once (30µs+5µs) by YAML::PP::Lexer::fetch_next_tokens at line 208 # once (7µs+2µs) by YAML::PP::Lexer::fetch_block at line 614
sub _push_tokens {
8796168512.9ms my ($self, $new_tokens) = @_;
8806168542.2ms6168532.4ms my $next = $self->next_tokens;
# spent 32.4ms making 61685 calls to YAML::PP::Lexer::next_tokens, avg 526ns/call
8816168535.8ms6168525.1ms my $line = $self->line;
# spent 25.1ms making 61685 calls to YAML::PP::Lexer::line, avg 406ns/call
8826168538.1ms6168525.7ms my $column = $self->offset;
# spent 25.7ms making 61685 calls to YAML::PP::Lexer::offset, avg 416ns/call
883
8846168567.5ms for (my $i = 0; $i < @$new_tokens; $i += 3) {
8859085736.1ms my $value = $new_tokens->[ $i + 1 ];
8869085721.4ms my $name = $new_tokens->[ $i ];
8879085716.3ms my $line = $new_tokens->[ $i + 2 ];
88890857115ms my $push = {
889 name => $name,
890 line => $line,
891 column => $column,
892 value => $value,
893 };
8949085731.7ms $column += length $value unless $name eq 'CONTEXT';
8959085715.6ms push @$next, $push;
8969085734.4ms if ($name eq 'EOL') {
897 $column = 0;
898 }
899 }
9006168543.8ms6168537.9ms $self->set_offset($column);
# spent 37.9ms making 61685 calls to YAML::PP::Lexer::set_offset, avg 614ns/call
90161685105ms return $next;
902}
903
904
# spent 64.2ms (59.8+4.44) within YAML::PP::Lexer::push_subtokens which was called 2057 times, avg 31µs/call: # 2056 times (59.7ms+4.44ms) by YAML::PP::Lexer::fetch_quoted at line 683, avg 31µs/call # once (51µs+3µs) by YAML::PP::Lexer::fetch_block at line 613
sub push_subtokens {
9052057634µs my ($self, $token, $subtokens) = @_;
90620572.13ms20571.21ms my $next = $self->next_tokens;
# spent 1.21ms making 2057 calls to YAML::PP::Lexer::next_tokens, avg 590ns/call
90720571.42ms2057799µs my $line = $self->line;
# spent 799µs making 2057 calls to YAML::PP::Lexer::line, avg 388ns/call
90820571.77ms2057900µs my $column = $self->offset;
# spent 900µs making 2057 calls to YAML::PP::Lexer::offset, avg 438ns/call
90920571.03ms $token->{column} = $column;
91020571.48ms $token->{subtokens} = \my @sub;
911
91220574.43ms for (my $i = 0; $i < @$subtokens; $i+=3) {
91361851.57ms my $name = $subtokens->[ $i ];
91461853.47ms my $value = $subtokens->[ $i + 1 ];
91561851.60ms my $line = $subtokens->[ $i + 2 ];
91661856.74ms my $push = {
917 name => $subtokens->[ $i ],
918 line => $line,
919 column => $column,
920 };
92161852.60ms if (ref $value eq 'HASH') {
92220567.37ms %$push = ( %$push, %$value );
92320561.64ms $column += length $value->{orig};
924 }
925 else {
92641292.31ms $push->{value} = $value;
9274129887µs $column += length $value;
928 }
92961852.08ms if ($push->{name} eq 'EOL') {
930 $column = 0;
931 }
93261852.28ms push @sub, $push;
933 }
93420571.04ms $token->{line} = $sub[0]->{line};
9352057795µs push @$next, $token;
93620572.47ms20571.53ms $self->set_offset($column);
# spent 1.53ms making 2057 calls to YAML::PP::Lexer::set_offset, avg 745ns/call
93720573.98ms return $next;
938}
939
940sub exception {
941 my ($self, $msg) = @_;
942 my $next = $self->next_tokens;
943 $next = [];
944 my $line = @$next ? $next->[0]->{line} : $self->line;
945 my @caller = caller(0);
946 my $yaml = '';
947 if (my $nl = $self->next_line) {
948 $yaml = join '', @$nl;
949 $yaml = $nl->[1];
950 }
951 my $e = YAML::PP::Exception->new(
952 line => $line,
953 column => $self->offset + 1,
954 msg => $msg,
955 next => $next,
956 where => $caller[1] . ' line ' . $caller[2],
957 yaml => $yaml,
958 );
959 croak $e;
960}
961
9621109µs1;
 
# spent 27.2ms within YAML::PP::Lexer::CORE:match which was called 13456 times, avg 2µs/call: # 13455 times (27.2ms+0s) by YAML::PP::Lexer::_fetch_next_line at line 148, avg 2µs/call # once (1µs+0s) by YAML::PP::Lexer::fetch_block at line 574
sub YAML::PP::Lexer::CORE:match; # opcode
# spent 20µs within YAML::PP::Lexer::CORE:qr which was called 11 times, avg 2µs/call: # 4 times (5µs+0s) by YAML::PP::Parser::BEGIN@18 at line 127, avg 1µs/call # once (5µs+0s) by YAML::PP::Parser::BEGIN@18 at line 50 # once (5µs+0s) by YAML::PP::Parser::BEGIN@18 at line 234 # once (1µs+0s) by YAML::PP::Parser::BEGIN@18 at line 122 # once (1µs+0s) by YAML::PP::Parser::BEGIN@18 at line 52 # once (1µs+0s) by YAML::PP::Parser::BEGIN@18 at line 120 # once (1µs+0s) by YAML::PP::Parser::BEGIN@18 at line 121 # once (1µs+0s) by YAML::PP::Parser::BEGIN@18 at line 51
sub YAML::PP::Lexer::CORE:qr; # opcode
# spent 202ms within YAML::PP::Lexer::CORE:regcomp which was called 58874 times, avg 3µs/call: # 18884 times (136ms+0s) by YAML::PP::Lexer::fetch_plain at line 376, avg 7µs/call # 18884 times (18.9ms+0s) by YAML::PP::Lexer::fetch_plain at line 383, avg 1µs/call # 14054 times (41.3ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 284, avg 3µs/call # 2056 times (2.56ms+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 724, avg 1µs/call # 2056 times (1.57ms+0s) by YAML::PP::Lexer::fetch_quoted at line 625, avg 763ns/call # 2056 times (911µs+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 741, avg 443ns/call # 689 times (651µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 329, avg 945ns/call # 88 times (122µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 264, avg 1µs/call # 88 times (119µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 270, avg 1µs/call # 6 times (39µs+0s) by YAML::PP::Lexer::fetch_next_tokens at line 208, avg 6µs/call # 3 times (171µs+0s) by YAML::PP::Parser::BEGIN@18 at line 127, avg 57µs/call # 3 times (22µs+0s) by YAML::PP::Lexer::fetch_plain at line 427, avg 7µs/call # once (44µs+0s) by YAML::PP::Parser::BEGIN@18 at line 50 # once (24µs+0s) by YAML::PP::Parser::BEGIN@18 at line 52 # once (16µs+0s) by YAML::PP::Parser::BEGIN@18 at line 51 # once (13µs+0s) by YAML::PP::Lexer::fetch_block at line 525 # once (13µs+0s) by YAML::PP::Parser::BEGIN@18 at line 120 # once (9µs+0s) by YAML::PP::Parser::BEGIN@18 at line 121 # once (8µs+0s) by YAML::PP::Parser::BEGIN@18 at line 122
sub YAML::PP::Lexer::CORE:regcomp; # opcode
# spent 196ms within YAML::PP::Lexer::CORE:subst which was called 75666 times, avg 3µs/call: # 18884 times (107ms+0s) by YAML::PP::Lexer::fetch_plain at line 376, avg 6µs/call # 18884 times (25.8ms+0s) by YAML::PP::Lexer::fetch_plain at line 383, avg 1µs/call # 14054 times (27.9ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 284, avg 2µs/call # 14054 times (18.3ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 302, avg 1µs/call # 2056 times (5.46ms+0s) by YAML::PP::Lexer::fetch_quoted at line 625, avg 3µs/call # 2056 times (5.30ms+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 724, avg 3µs/call # 2056 times (2.47ms+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 741, avg 1µs/call # 2056 times (1.69ms+0s) by YAML::PP::Lexer::_read_quoted_tokens at line 727, avg 820ns/call # 689 times (1.00ms+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 329, avg 1µs/call # 689 times (825µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 331, avg 1µs/call # 88 times (47µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 264, avg 534ns/call # 88 times (29µs+0s) by YAML::PP::Lexer::_fetch_next_tokens at line 270, avg 330ns/call # 6 times (7µs+0s) by YAML::PP::Lexer::fetch_next_tokens at line 208, avg 1µs/call # 3 times (1µs+0s) by YAML::PP::Lexer::fetch_plain at line 427, avg 333ns/call # 2 times (2µs+0s) by YAML::PP::Lexer::fetch_block at line 531, avg 1µs/call # once (3µs+0s) by YAML::PP::Lexer::fetch_block at line 525
sub YAML::PP::Lexer::CORE:subst; # opcode