Repository navigation
Commit e1fc47a
committed
perf: read the metadata ahead and map it up front
Mapping the metadata lazily moved the cost of loading it onto the first
access of each class, as page faults, and made those accesses noisier.
Populating the mapping removes that, and asking for the whole file to be
read ahead first keeps a cold start from paying for it one read-ahead
window at a time: on the API 36 emulator with the page cache dropped,
loading the metadata takes 3.1 ms read into the heap, 3.8 ms populated
without the read-ahead and 2.2 ms with it.1 parent 2488d7f commit e1fc47a
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2188 | 2188 | | |
2189 | 2189 | | |
2190 | 2190 | | |
2191 | | - | |
2192 | | - | |
2193 | | - | |
2194 | | - | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
2195 | 2201 | | |
2196 | 2202 | | |
2197 | 2203 | | |
| |||
2201 | 2207 | | |
2202 | 2208 | | |
2203 | 2209 | | |
2204 | | - | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
2205 | 2213 | | |
2206 | 2214 | | |
2207 | 2215 | | |
| |||
0 commit comments