Commit ea40c31
committed
Skip parent constructor in WP_MySQL_Token
Token construction is on the lexer hot path; bypassing the
`WP_Parser_Token::__construct()` indirection and assigning the four
properties directly removes one method call per token.
Requires `$input` on `WP_Parser_Token` to be `protected` instead of
`private` so the subclass can write to it.
Co-authored-by: Adam Zieliński <adam@adamziel.com>
Adapted from #3751 parent e83b523 commit ea40c31
2 files changed
Lines changed: 6 additions & 2 deletions
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments