System information: v11.3 on Windows 10

This is a piece of dynamic code which has no relevance to mouse actions:

DynamicModule[{s = 0}, 
    s += .01; 
    Graphics[Disk[{0, 0}, 1, {Floor[s, 2 Pi], s}], PlotRange -> {{-1, 1}, {-1, 1}}]]]

Well, surely it don't require much resource, so it goes smoothly when your mouse isn't moving. However, if you move your mouse, even not inside the graphics viewport, it will stutter.

Another wierd behavior emerges when I tried an alternative approach:

     Disk[{0, 0}, 1, {Floor[SessionTime[], 2 Pi], SessionTime[]}], 
     PlotRange -> {{-1, 1}, {-1, 1}}], UpdateInterval -> .01]

This code would stutter if no other dynamic content is present on screen, but would work fluently if other dynamic contents exists, e.g., the first example. BTW, it seems that there's some synchronization in dynamic updating of multiple contents, they stutter together.

How can I make both dynamic expressions update smoothly?

Note: This behavior is not present in V8 if my memory is not wrong, but appeared in V9.

  • $\begingroup$ first example works with no problem for me. 11.3 on windows. Your second example does not even run. It has error. You do not seem to have defined s in it. $\endgroup$ – Nasser Jun 8 '18 at 8:41
  • $\begingroup$ I can't reproduce it but I believe you. $\endgroup$ – Kuba Jun 8 '18 at 8:43
  • $\begingroup$ @Nasser the s should be deleted... I've edited the post. $\endgroup$ – Wjx Jun 8 '18 at 8:48
  • 1
    $\begingroup$ 11.3 on Windows 10: I see the stuttering also. But the statement above "This code would stutter if no other dynamic content is present on the screen..." is critical. The critical part "is present on the screen" as opposed to "is running but not currently present on the screen". That doesn't at all give an answer but is my attempt to clarify the actual conditions when the issue exists. $\endgroup$ – JimB Jun 8 '18 at 15:15
  • 1
    $\begingroup$ Reminds me of the paceman question $\endgroup$ – Michael E2 Jun 8 '18 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.