This probably won’t help you with your issue. But just to fill you in on what was the cause of my own problem:
Stopping the logging made a very minor difference (minor enough that I considered putting the logging back in again). The main problem in my instance turned out to be that I was (stupidly) reassigning a textStim variable within a win.flip() loop, meaning that it was creating a new textStim variable on every frame… The textStim class turns out (turned out? Perhaps it’s since been fixed) to have a small memory leak in it, but this leak compounded quite fast when I was creating new textStim variables on every frame.
Just to keep you in the loop. I hope some of the others can provide you with some answers.