Mac freezes/unresponsive - a process called mediaanalysisd
I recently came across a problem where my MacBook freezes when i left it idle for few minutes. In order to figure out what was causing it, i opened Activity Monitor and then left it idle.
I saw that a process called "mediaanalysisd" was causing the problem. I tried the solution mentioned here : https://discussions.apple.com/thread/7965601?page=2 . But no matter what I tried i could not delete that file. So I figured out a solution of my own which i will comment below.