What is mdflagwriter and why does it eat up so much RAM?

On my Mavericks 10.9.4 instance of mdflagwriter eats up 2.18G of RAM. I know that it's somehow related to Spotlight, but what is it exactly and why is it so RAM-hungry?


/System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdflagwriter is part of Spotlight's indexing. There seems to be a bug present for some people where mdflagwriter uses a considerable amount of RAM, but no canonical fix, apart from reinstalling OS X, or for some people reindexing with sudo mdutil -E /.