Bug introduced in V10.4 or earlier and persisting through V11.3


Here is an example of a problem I have. Gutted version of something much bigger:

handler2 =  Framed[#,    Background ->  Dynamic[ FEPrivate`If[ 
  , RGBColor[1, 0, 0]
  , RGBColor[0, 1, 0]
]]] &

      ConstantArray[handler2@Grid[{{#, #, #, #, #, #, #}} ], 30],
      Spacings -> 0
     , Scrollbars -> {False, Automatic}     
     , ImageSize -> {Full, Full}
     , Alignment -> Top
    , ImageSize -> {300, 200}
    ] & /@ (
   Button[#, 1, Appearance -> None] & /@ {
       Show[Graphics@Disk[], ImageSize -> {Automatic, 20}]
     , "TEST"
   } )

enter image description here

As you can see the left one is really laggy. The example is artificial so don't tell me to change anything.

The question is what causes that and how to avoid this? Can you reproduce that? (V11.1.1 Win7) If you can't reproduce that run this and try again:

CurrentValue[$FrontEndSession, {TaggingRules, "whatever"}] =  Encrypt["key", "test"]

and let me know.

All those Framed with Dynamic Background are independent and don't do anything fancy, yet there seems to be some kind of interference between "MouseOver" event / Full ImageSize / Pane's Scrollbars / Graphics inside Button and TaggingRules - because as soon as any of those options is removed it works fine. Also the right example without Disks show no problem.



I've discussed this with our developers, and it seems that the evaluation of the Scrollbars parameter is happening every time the mouse moves, and this is the cause of the issue. Using graphics instead of text in the button is more sluggish because there is more to render. The developers did notice that the example with "TEST" is sluggish too, but not nearly as much as the graphic version.

As a temporary workaround, Scrollbars -> {False, True} greatly improves the performance. In any case, I have filed a report with our developers [...]


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.