-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit ace9a74
Auto merge of #145848 - Kobzol:optimize-file-read, r=the8472
Slightly optimize reading of source files
Discussed on Zulip (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/rustc.20uses.20silly.20amount.20of.20syscalls.20for.20file.20IO/with/536015625.
Do not open/close each source file twice when reading it. We still stat it twice though.1 file changed
+8
-2
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 | + | ||
12 | 13 |
| |
13 | 14 |
| |
14 | 15 |
| |
| |||
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 | - | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
119 | 123 |
| |
120 | 124 |
| |
121 | 125 |
| |
122 | 126 |
| |
123 | 127 |
| |
124 | - | ||
128 | + | ||
129 | + | ||
130 | + | ||
125 | 131 |
| |
126 | 132 |
| |
127 | 133 |
| |
|
0 commit comments