Commit a86f7e3
authored
Microoptimise read buffering, metastore abspath, path joining (#20810)
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 b8b50b1 commit a86f7e3
2 files changed
Lines changed: 18 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
1466 | 1467 | | |
1467 | 1468 | | |
1468 | 1469 | | |
1469 | | - | |
| 1470 | + | |
1470 | 1471 | | |
1471 | 1472 | | |
1472 | 1473 | | |
| |||
1475 | 1476 | | |
1476 | 1477 | | |
1477 | 1478 | | |
1478 | | - | |
| 1479 | + | |
1479 | 1480 | | |
1480 | 1481 | | |
1481 | 1482 | | |
| |||
1489 | 1490 | | |
1490 | 1491 | | |
1491 | 1492 | | |
1492 | | - | |
| 1493 | + | |
1493 | 1494 | | |
1494 | 1495 | | |
1495 | 1496 | | |
| |||
1539 | 1540 | | |
1540 | 1541 | | |
1541 | 1542 | | |
1542 | | - | |
| 1543 | + | |
1543 | 1544 | | |
1544 | 1545 | | |
1545 | 1546 | | |
| |||
2393 | 2394 | | |
2394 | 2395 | | |
2395 | 2396 | | |
2396 | | - | |
| 2397 | + | |
2397 | 2398 | | |
2398 | 2399 | | |
2399 | 2400 | | |
| |||
4327 | 4328 | | |
4328 | 4329 | | |
4329 | 4330 | | |
4330 | | - | |
| 4331 | + | |
4331 | 4332 | | |
4332 | 4333 | | |
4333 | 4334 | | |
| |||
| 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