At work, when developing WordPress sites we share the same database and media files between all developers as well as with staging. This means, that every time someone uploads a new image to the WordPress media library, the image needs to be transferred to other developers as well.
I probably should write a post about that arrangement, how that is done and why it’s so awesome.
The database part is more or less simple. But the shared media library isn’t. Basically, when developer John uploads a new image it needs to be available also on developer Mike’s environment as well. You could always send a dump of new media files every now and then, but that’s really not an efficient use of time. We wanted it to be magic. Automatic. Instant (almost).
Enter Resilio Sync. That is absolutely fantastic little tool that keeps the media library files well, synchronised, between every developer’s environment.
A few months back, I noticed that my macOS battery was draining and didn’t last as long as I was used to. During the summer, it seemed to get worse – a 30% charge didn’t last even an hour-long video call.
So I started to wonder what’s going on. Battery health was ok. The capacity was ok. Well ok, the battery seemed to be in good condition so it must be something else. Maybe some app is draining my Macbook Pro battery?
Indeed some app was. You might guess which one…
That didn’t look normal at all. How app that is mostly running in the background and not doing any synching at the moment (we were on holidays, no new files were added for multiple weeks) can have such a high energy impact?
It turned out that Resilio Sync does something called folder rescan every 10 minutes, which looks for added, modified or removed files within the shared directory. Necessary thing if you ask me, as changes need to be sent to everyone with whom the directory is shared. Resilio also relies on system notifications to detect these changes. Given that, every 10 minutes for folder rescan sounded simply too much.
Opening the Resilio Sync settings, and “Power user preferences” under the tab “Advanced” reveals a view to fine-tuning settings. Search for “folder_rescan_interval” and change its value to 3600 (one hour). Then restart Resilio for the change to take effect.
That’s all, this stopped the Resilio Sync from draining my Macbook Pro battery! The energy impact is now significantly lower.
This post is part of my 30 weeks of clicking that publish button. Thank you Cory Miller for the inspiration!