Commit 3f7854d
committed
Cache argument values per field node during execution
Add _arg_cache dictionary to ExecutionContext to cache parsed
argument values by field node id. Since arguments are derived
from the static AST and constant variable_values, they can be
safely cached for the duration of execution.
This removes get_argument_values from the hot path - previously
taking 0.113s for 120K calls, now cached after first call per
field node.
Performance: ~5% faster execution on nested queries.1 parent f9b002c commit 3f7854d
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
608 | | - | |
609 | | - | |
610 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
611 | 617 | | |
612 | 618 | | |
613 | 619 | | |
| |||
0 commit comments