| Reference | Downloads | Github

Excessive Memory Usage Issues

URL of experiment:
Description of the problem: Memory usage while experiment is running peaks at about 4.5 GB.

I’m new to PsychoPy and have written my first experiment. I’ve been beta-testing it myself and it works fine. However, as we got closer to our final version, and I increased the number of trials (and number of words studied per trial), I noticed the amount of memory I was using was quite high.

The experiment is pretty simple and I’m surprised how much memory it’s using. I do have a few portions that accept written responses from the participant that show up on screen. These involve updates to the screen every frame.

The memory usage seems to just keep climbing until the experiment starts to break down. Things stop appearing as they are intended to (e.g., no longer a fixation cross in between words, rating scale not showing above word, etc.). And then the experiment crashes.

Any advice is greatly appreciated. The experiment is still set to pilot mode.

I believe I have resolved this issue myself. I believe the memory issues were caused by changing TextStim instances every frame. Now, I only check for keyboard input every frame, and if there is any input then I change the StimText.

1 Like

Absolutely. Only update things which have changed.