Commit e2dad91
glob: add shared result path type
Summary:
Add `GlobPath`, a compact path representation that shares each directory prefix and stores only the basename per result. Comparisons and Thrift serialization operate directly on the pieces without materializing the full path. Paths converted before shared traversal state is available retain one owned full-path buffer, avoiding separate prefix and basename allocations. `toIOBuf()` returns its head wrapper by value to avoid one temporary allocation per serialization call.
This also adds `PathComponent::intoStorage()` so traversal can move `PathComponent` storage into result objects without another basename allocation. This commit introduces and tests the representation; the following commit wires it into glob traversal and Thrift responses.
Reviewed By: genevievehelsel
Differential Revision: D113152048
fbshipit-source-id: a761dc3c447150f9800c1f39b667717794a3ff531 parent be720a6 commit e2dad91
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments