Commit a7e66a6
authored
Speed up options snapshot calculation (#20797)
The `options_snapshot` function was using up to 19% CPU in small
incremental runs in a very large codebase, when not using orjson.
Micro-optimize it, and use binary serialization instead of json.
We can still make this faster, but first let's see how much this helps.1 parent d422b3d commit a7e66a6
2 files changed
Lines changed: 30 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| 114 | + | |
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| |||
1616 | 1620 | | |
1617 | 1621 | | |
1618 | 1622 | | |
1619 | | - | |
| 1623 | + | |
1620 | 1624 | | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1624 | 1634 | | |
1625 | 1635 | | |
1626 | 1636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
608 | 612 | | |
609 | 613 | | |
610 | 614 | | |
611 | | - | |
612 | | - | |
613 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
614 | 625 | | |
615 | 626 | | |
616 | 627 | | |
617 | | - | |
618 | | - | |
| 628 | + | |
| 629 | + | |
619 | 630 | | |
620 | 631 | | |
621 | 632 | | |
| |||
0 commit comments