Skip to content

ls: list xattrs once per file for -l --color - #17062

Open
Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:feature-issue#15207-ls-llistxattr-once
Open

Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:feature-issue#15207-ls-llistxattr-once

Conversation

@Franklin-Qi

Copy link
Copy Markdown
Contributor

Cache a single listxattr summary on PathData so the long-format ACL check and capability coloring share one syscall instead of two.

Closes: #15207

Comment thread src/uucore/src/lib/features/fsxattr.rs Resolved
Comment thread tests/by-util/test_ls.rs Resolved
Comment thread src/uu/ls/build.rs Resolved
@Franklin-Qi
Franklin-Qi force-pushed the feature-issue#15207-ls-llistxattr-once branch from f44bf3e to 7ee522d Compare December 4, 2026 07:09
Cache a single listxattr summary on PathData so the long-format ACL
check and capability coloring share one syscall instead of two.

Closes: uutils#15207
@Franklin-Qi
Franklin-Qi force-pushed the feature-issue#15207-ls-llistxattr-once branch from 7ee522d to 8c17374 Compare December 4, 2026 07:50
@codspeed

codspeed Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 3.1%

2 warnings, 1 note

⚠️ 125 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

⚡ 1 improved benchmark
✅ 422 untouched benchmarks
⏩ 78 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ CPU Simulation ls_recursive_long_all_balanced_tree[(6, 4, 15)] 214.8 ms 208.4 ms +3.1%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Franklin-Qi:feature-issue#15207-ls-llistxattr-once (8c17374) with main (3ef8203)

Open in CodSpeed

Footnotes

  1. 78 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ls: --colors=always -l . calls llistxattr twice for the same file

2 participants