Page 1 of 1

Strange Scrolling performance and even stranger fix

Posted: Tue Mar 18, 2014 6:14 pm
by makeshyft
Hi everyone,

I have a card with a group that I scroll to reveal content. The performance is really fast and really good.... except that I seem to have to leave the card and then come back. When it initially sets, its sluggish and slow.

I've been trying to hunt down the cause of this, as far as I can tell..... it happens when I use a setprop handler that changes the properties of many many things on the card. When I leave and come back to the card, it works well.

If at the end of the setprop handler I add

lock screen
go to different card
go to original card
unlock screen

then the performance problem is gone. The layer mode of the scrolling group is set to "Dynamic"....(dynamic vs. scrolling gives very similar performance)

I'm just not sure I want to use such a workaround.

Any idea what could be the problem?

Thanks....

Re: Strange Scrolling performance and even stranger fix

Posted: Tue Mar 18, 2014 6:40 pm
by FourthWorld
It may be helpful to see the full handler in which that code resides, if possible. Also, it's not clear to me which is new, the "lock screen" or going to another card.

Re: Strange Scrolling performance and even stranger fix

Posted: Tue Mar 18, 2014 6:52 pm
by makeshyft
Hi Richard,

the whole thing

lock screen
lock messages
go to different card
go to original card
unlock messages
unlock screen

is at the end of the handler and that solves the problem.

The problem is the handler is one that goes through every control of the group and changes its properties ...(enable/disable buttons, change colors, etc).....so its really long and only contains calls to other handlers. ... like so....

Code: Select all

else if SetUIStateTo is "UMP File Open" then
      
      lock screen
      
      EnableDisableControls "User Interface","Enabled","User Interface"
      EnableDisableControls "W_GENERAL","Enabled","CC", "W_New User","W_Sign In"
      EnableDisableControls "W_FILE ACTIONS","Enabled","CC", "W_Open UMP File","W_New UMP File","W_Open Invitation"
      //EnableDisableControls "W_PVFA","Enabled","CC"
      EnableDisableControls "W_QUESTIONS","Enabled","CC"
      EnableDisableControls "W_STATEMENTS","Enabled","CC"
      EnableDisableControls "W_RESPONSES","Enabled","CC"
      EnableDisableControls "W_TAGS","Enabled","CC"
      EnableDisableControls "W_CONNECTIONS","Enabled","CC"
      EnableDisableControls "W_TRASHCAN","Enabled","CC"
      EnableDisableControls "W_AGREEMENTS","Enabled","CC"
      EnableDisableControls "W_FACILITATORS","Enabled","CC"
      EnableDisableControls "W_ADMINISTRATORS","Enabled","CC"

the code for the handler being called is .....

[code]on EnableDisableControls WhatGroupToSendTo,WhatStateYouWant,WhatGroupReference
   local parameters_to_send
   
   put "EnableDisableMe " & quote & WhatStateYouWant & quote & comma & quote & WhatGroupReference & quote into parameters_to_send
   
   if the paramcount <= 3 then
      // No exceptions
   else
      // Cycle through Exceptions & add to message to send
      repeat with exception = 4 to the paramcount
         put comma & quote & param(exception) & quote after parameters_to_send
      end repeat
   end if
   send parameters_to_send to group WhatGroupToSendTo
end EnableDisableControls


Basically..... this handler sends a message to a group and then goes through all its controls and sets properties. There are about
13 of these groups inside the one main one that I scroll.

Thanks Richard.

Re: Strange Scrolling performance and even stranger fix

Posted: Tue Mar 18, 2014 7:16 pm
by makeshyft
I think I will just use this workaround for now..... this is probably not something that can be diagnosed without looking at the full stack. Thanks for efforts.

Re: Strange Scrolling performance and even stranger fix

Posted: Tue Mar 18, 2014 7:32 pm
by makeshyft
Whats even more weird is that the performance seems to improve each time that i leave and come back to the card.....SO WEIRD!!!