Commit 8016744
committed
Microoptimise read buffering, metastore abspath, path joining
Removing buffering on file reads can make those reads like 20% faster.
This is probably worth a few percent on a warm cache profile I was
looking at.
Removing abspath in metastore also looks like a percent or two on a warm
cache profile.
I don't think using the faster path join from #17949 will really help
the profiles I was looking at, but if we're microoptimising some of
these code paths we might as well. (On a cold profile I do think some
of the variadic os.path.join now add up enough that it could be worth
making a function for them, but whatever)1 parent 17e4a45 commit 8016744
2 files changed
Lines changed: 18 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | | - | |
| 603 | + | |
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
| |||
1541 | 1542 | | |
1542 | 1543 | | |
1543 | 1544 | | |
1544 | | - | |
| 1545 | + | |
1545 | 1546 | | |
1546 | 1547 | | |
1547 | 1548 | | |
| |||
1550 | 1551 | | |
1551 | 1552 | | |
1552 | 1553 | | |
1553 | | - | |
| 1554 | + | |
1554 | 1555 | | |
1555 | 1556 | | |
1556 | 1557 | | |
| |||
1564 | 1565 | | |
1565 | 1566 | | |
1566 | 1567 | | |
1567 | | - | |
| 1568 | + | |
1568 | 1569 | | |
1569 | 1570 | | |
1570 | 1571 | | |
| |||
1614 | 1615 | | |
1615 | 1616 | | |
1616 | 1617 | | |
1617 | | - | |
| 1618 | + | |
1618 | 1619 | | |
1619 | 1620 | | |
1620 | 1621 | | |
| |||
2468 | 2469 | | |
2469 | 2470 | | |
2470 | 2471 | | |
2471 | | - | |
| 2472 | + | |
2472 | 2473 | | |
2473 | 2474 | | |
2474 | 2475 | | |
| |||
4406 | 4407 | | |
4407 | 4408 | | |
4408 | 4409 | | |
4409 | | - | |
| 4410 | + | |
4410 | 4411 | | |
4411 | 4412 | | |
4412 | 4413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | | - | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
171 | | - | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
0 commit comments