psychopy.org | Reference | Downloads | Github

How to solve slow movie/image loading times

Hello everyone,

This is solution to a problem that has been haunting me (and some people in this forum) for a while now. This refeers to how slow psychopy is (in some computers) in loading videos or images, leading to, for example, >3s of loading per trial just to load a 400kb video, and to an inability to keep 60Hz during a trial when setting several images that are presented are set to “set every frame” (this is because I wanted to refresh image sets mid trial).
The solution is simple, disable windows real time protection. I noticed that just before each movie loaded, “antimalware service executable” in windows task manager ramped up in activity (from “low CPU usage” to “high CPU usage”). This happened during that 3s or more period where psychopy was frozen trying to load the video for that new trial and immeaditaly stopped after it loaded the video. This happened after a random Windows update a few months ago.
Hope someone finds this helpful.