Commit 8cf581b
committed
Optimize the file iteration
Each `simplefs_extent` structure contains a counter that records the
total number of files within that extent. When the counter matches the
expected file number, it indicates there are no more files after this
index, allowing the iterator to skip directly to the next extension block.
This reduces unnecessary scanning and improves traversal efficiency.1 parent 17e6c30 commit 8cf581b
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
0 commit comments