1

System information: v11.3 on Windows 10


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

DynamicModule[{s = 0}, 
  Dynamic[
    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:

Dynamic[
   Graphics[
     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.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Wjx
  • 9,558
  • 1
  • 34
  • 70
  • 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. – Nasser Jun 08 '18 at 08:41
  • I can't reproduce it but I believe you. – Kuba Jun 08 '18 at 08:43
  • @Nasser the s should be deleted... I've edited the post. – Wjx Jun 08 '18 at 08:48
  • @Nasser wierd, so it seems that it's system relevant? I'm using XPS13-9350 with intel i7-6560U – Wjx Jun 08 '18 at 08:55
  • May be. I am using intel i7-3930k with NVIDIA GeForce GTA 650 card. window 7, home premium 64 bit – Nasser Jun 08 '18 at 09:03
  • 1
    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. – JimB Jun 08 '18 at 15:15
  • 1
  • @JimB That's true, thanks for the clarification~ – Wjx Jun 09 '18 at 10:57

0 Answers0