@bhaules

Just memo;
It seems Indexing 50 photos took around 3~4 seconds. (It is too slower than I expect) 5000 photos will take 3000~4000 sec, = around 50 ~ 60minutes.
But your scanInterval is 10 minutes. It might be the reason? Before finishing the previous scanning cycle, a new cycle might begin.

As I mentioned earlier on github, scanning 5thousands photos every 10 minutes to show random 5 pictures in that 10 minutes, seems not so much efficient.