I struggled with the problem that the experiment runs, but that the runner afterwards is super slow in closing or it freezes. I did not see any solutions online, however I have now found a working solution and therefore would like to share it.
OS : Windows 11 Home
PsychoPy version v2023.2.3
What are you trying to achieve?: I am building an experiment with multiple routines, loops and code blocks. It is quite a big program with multiple variables, objects, etc. I ran into the weird issue that I had a working code and the experiment behaved as it should: it runs smoothly and it outputs the .csv data file. Once the experiment window is closed it also disappears at normal speed. However, the closing of the PsychoPy Runner after closing the experiment window unexplainably took forever and often resulted in the entire program freezing. The longer the program ran, the longer it took to close.
What did you try to make it work?: The problem was in the data logging. For all the variables, objects, etc it was logging it after closing the experiment in the Runner per millisecond that the experiment ran. This slows down the runner a lot.
If the logging level is changed to a less detailed one, the experiment and the closing of the experiment run fast again. This can be found in the settings of psychopy (the cogwheel symbol) > Data > Logging level. I set it to ‘warning’. Higher up in the list (error) is least detailed logger, lower in the list (debug) is most detailed logger.