New issue
Advanced search Search tips

Issue 810617 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Spotlight indexing Chrome data wastes power and CPU

Reported by dmacl...@gmail.com, Feb 9 2018

Issue description

UserAgent: 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.
 

Comment 1 by ajha@chromium.org, Feb 9 2018

Labels: Needs-Bisect Needs-Milestone
Labels: -Needs-Bisect
Owner: sdy@chromium.org
Status: Assigned (was: Unconfirmed)
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 :)
Labels: M-71
It looks like .metadata_never_index isn't working — the supported solution is to rename the folder with a .noindex suffix :/.
Cc: rsesek@chromium.org
There's also _MDSetExclusion(NSString* path, bool exclude)
(Though that'll make the directory show up in the Spotlight preferences.)
 Issue 881338  has been merged into this issue.
(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