Some months ago, when I started to explore extended attributes (xattrs) more seriously, I built myself a tool to scan large folders, like ~/Documents, and analyse all the files there for xattrs. For various reasons – not least the fact that it sat with a spinning beachball for many minutes at a time – I never released it here.
I have now rolled this tool into a new release of my xattr editor, xattred, available from here: xattred10b5
and in Downloads above.
For anyone interested in xattrs, this is a compelling addition. It finds and analyses xattrs which you didn’t know existed, tells you how often they occur, and if you really want, it will list the contents of every xattr of that type. Suddenly, what you thought was quite little-used is revealed to be exceedingly common: macOS, its apps and documents do use xattrs a great deal.
The Xattr Scanner comes at a cost, though: not money (!), but resources. Scanning performs a deep traversal of the selected folder, which examines every single file within it. I’ve been stress-testing it and my Mac on my /Applications folder, which contains over two million files, a large proportion of which have xattrs. Full scans of that can take several minutes and up to 10 GB (yes, gigabytes) of memory.
I have now put the Xattr Scanner into a background task, so you should only ever see the spinning beachball when xattred is doing its final analytical steps. Those have to be performed in the main thread, so can lead to a brief period of ‘unresponsiveness’. macOS seems to handle the memory allocation quite happily, and even tries to cache the deep traversal to make subsequent scans of the same folder faster.
xattred 1.0b5 should run happily on El Capitan, Sierra, and High Sierra, the latter on both HFS+ and APFS.
My remaining tasks with xattred, other than fixing any bugs which might surface, are to add Undo to commands for its main document windows, and to try to explain all this in a Help book. If you have any other features you’d like added for the first full release version, please suggest them in comments below.