Spotlight indexing Chrome data wastes power and CPU
Reported by
dmacl...@gmail.com,
Feb 9 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce the problem: Start running Chrome In a Terminal window run sudo fs_usage -w -f filesys mdworker | egrep "open" Open and close some sites in Chrome What is the expected behavior? I wouldn't expect spotlight to be indexing the files in /Users/dmaclach/Library/Application Support/Google/Chrome the majority of which aren't going to have any useful data What went wrong? Spotlight is indexing these files every time Chrome writes to them. Did this work before? N/A Chrome version: 63.0.3239.132 Channel: stable OS Version: OS X 10.12.6 Flash Version: Adding .noindex to the /Users/dmaclach/Library/Application Support/Google/Chrome path would probably be sufficient to stop this.
,
Feb 9 2018
Hum - do you have .metadata_never_index in `~/Library/Application Support/Google/Chrome`? We've been putting that there since r328086, but I think it was undocumented. Maybe Apple changed it to .noindex and have started ignoring .metadata_never_index :/. Or maybe your profile on disk is older than May, 2015. sdy - maybe you're interested :)
,
Aug 14
It looks like .metadata_never_index isn't working — the supported solution is to rename the folder with a .noindex suffix :/.
,
Sep 6
There's also _MDSetExclusion(NSString* path, bool exclude)
,
Sep 6
(Though that'll make the directory show up in the Spotlight preferences.)
,
Sep 6
Issue 881338 has been merged into this issue.
,
Sep 7
(copying comment from Issue 881338 here) @sdy is 100% correct - .metadata_never_index doesn't actually seem to do anything in non-root folders (~/Library/Application Support/Google/Chrome is definitely not a root folder) on modern macOS (at least 10.13) despite being widely mentioned as preventing spotlight indexing on the web. See https://apple.stackexchange.com/questions/92784/preventing-spotlight-from-indexing-files-folders#comment396013_92785 for the suggestion that .metadata_never_index only has an impact at volume level. People are even citing Chrome as a reason to use it on sub folders - https://github.com/npm/npm/issues/15346#issuecomment-309305390 (which points to 395300)! Could future versions of Chrome remove this useless file? For what it's worth there are a list of builtin folders that Spotlight won't index and these include: Directories and files that start with a dot (.) Hidden folders (those whose extended flags mark them as hidden) although there is a rumour this doesn't apply to their subfolders Folders whose name ends in .noindex Files the user has explicitly excluded Somewhere I came across a plist that contained a big list of built-in folders that are skipped but I sadly can't find it now... |
||||
►
Sign in to add a comment |
||||
Comment 1 by ajha@chromium.org
, Feb 9 2018