MATLAB Answers

Dan
0

WindowButtonMotion responds more slowly in version 2014

Asked by Dan
on 9 Apr 2015
Latest activity Commented on by Dan
on 21 Apr 2015
After upgrading from version 2013 to 2014, I noticed that my program ran much more slowly. At first I thought it was the new graphics system (as my program is graphics intensive) but now I think the problem is the due to overall GUI & system sluggishness.
This is best illustrated as follows: When a user moves the mouse, the WindowButtonMotion function is called. I used the tic & toc functions (and removed ALL other code) and found that version 2013 responds to mouse motion approximately TWICE as fast as version 2014!
Try it yourself! 1) Using GUIDE, create a program. 2) Insert two lines in that program's figure's WindowButtonMotion function. For the first line put toc. For the second line put tic. (Make sure to put them in that order) 3) Run the code and move the mouse!(In both version 2013 & 2014)
My system reports an average latency of 0.015 seconds for version 2013 and 0.03 seconds for version 2014. It doesn't sound like much but it translates to a very sluggish look & feel when the mouse motion is translated to graphical operations.
Adjusting the mouse "tracking speed" in my mac's "system preferences" had no effect. Any suggestions?
Dan

  1 Comment

I took an even closer look and have changed my theory of what is occurring. My earlier theory was based on the timings reported by toc as echoed on the command window. In that experiment, I just looked at the timings in the command window & estimated that inter-mouse event intervals were approximately 0.03 seconds (with some variation of course). The same experiment in version 2013 produced inter-mouse event intervals were approximately 0.015 seconds.
BUT.... this experiment was flawed in that: 1) It relied on just visual inspection AND (more importantly) 2) toc was echoing text to the command window.
So... although there WAS a huge difference in timings, this difference may not be the result of delays from mouse movements to the associated mouse movement function.
So I changed my code & stopped toc from echoing to the command window and just stored the timings in a variable which I later wrote out to a csv file. I ran the code in both 2013 & 2014 (moving the mouse as fast as I could) and found essentially NO difference!
So.... the problem lies.... elsewhere. I guess I'm back to my original theory that version 2014 is slower in interacting with graphics (or even the Matlab GUI) than version 2013. I will continue experimenting.
Dan

Sign in to comment.

0 Answers