Platform macOS HighSierra, Intel Core i7 (3.1 GHz) 16 GB memory
PsychoPy 3.0.3, python 3.5.6 Anaconda installation
I am using Psychopy as a python package and I am trying to update coordinates of 300 elements in ElementArray stimulus:
stim.xys = newXYs # newXYs is a 300 x 2 numpy array
Updating the coordinates takes ca. 16 ms as measured by %timeit (15.9 ms ± 186 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)). I am wondering has anyone done some benchmarking and, if so, what would be the expected duration of updating xys?
NB - I noticed that, in the xys function in the elementarray.py method definition, the new attribute is written into self._dict_[‘xys’] and a flag is set to self._needVertexUpdate. The actual vertex update is, however, executed in self.draw() function which I did not call when doing benchmarking.