You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ls: --colors=always -l . calls llistxattr twice for the same file #15207
-l and --color each inspected extended attributes independently, with no shared result:
Long listing (-l) — has_acl() decides whether to print + after the mode bits. That lists xattrs via llistxattr. The same check ran during column-width calculation and again when printing each line.
Coloring (--color) — capability styling (ca in LS_COLORS) used has_security_cap_acl(), which also listed xattrs with another llistxattr.
Activity
oech3 commentedon Oct 9, 2026
@Alonely0 Do you know anything about this? because you worked about perf of
lsvery much.Franklin-Qi commentedon Oct 9, 2026
-l and --color each inspected extended attributes independently, with no shared result:
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
Alonely0 commentedon Oct 10, 2026
I have vague memories of this. It seems @Franklin-Qi already tackled it, so I'll get their PR reviewed by Monday at the latest.
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color
ls: list xattrs once per file for -l --color