Hi,
My situation
In my app there is about 3-4 secs gap from the time a button is clicked and the plots displayed. Though the time gap is not too bad, it is enough to create a doubt even in my mind if the application is working or is stuck. This is mainly bcos the mouse doesn’t show any indication.
What I tried:
So I am trying to provide a ‘Please wait…’ kind of a message after the button is clicked. I created a Div of ‘wait’ text with visibility set to False and the very first line in myfunction I set it to True.
The code which invokes myfunction that creates plots.
mybutton.on_click(myfunction)
The very first line sets it to true
def myfunction():
waittxt.visible = True # show wait msg to user.
Where I need help
The issue is that this msg is getting displayed after nearly 2-3 seconds. And within 0.5-1.0 secs of that msg displayed the plots are displayed. Even a 3-word message disappears even before one can read it.
My main intention is to get the msg displayed ‘as soon as the button is clicked’ and not 2-3 secs later. Given that the very first line in my invoked function is to set this text to true, I am wondering if those initial 2-3 secs are spent on something else. Since my code is too big I am not pasting it here, but I am open to do screenshare offline (over zoom etc.) if needed.
Any tips on this are greatly appreciated.
cheers.