project-machine / puzzlefs

Apache License 2.0
380 stars 18 forks source link

Avoid reading the entire vector of inodes just for determining the #49

Closed ariel-miculas closed 1 year ago

ariel-miculas commented 1 year ago

length

cbor stores the length of arrays in its encoding so we can just extract it from there

Traversing the same filesystem with tree now takes only 1m 24s instead of 50m 01s. tree /tmp/puzzle 0.31s user 1.05s system 0% cpu 50:01.40 total tree /tmp/puzzle 0.13s user 0.43s system 0% cpu 1:24.36 total

Signed-off-by: Ariel Miculas amiculas@cisco.com