Community
Participate
Working Groups
BusyIndicator immediately shows the busy cursor, before executing the tasks. Would be nice if we could define a delay in ms which would be used to wait before showing the busy cursor. This way, we could avoid cursor "jumps" for fast executing tasks.
Paul, WDYT?
Looking at how the busy indicator is implemented, I think it's kind of hard to estimate a delay on it to reduce flashing for fast tasks. The only way we would know if the task is fast is if we run it once & measure. My suggestion would be to have a minimum time the busy indicator would last for (eg, 1 second) even if the task is fast, the flashing is gone.
I think a good value before changing the cursor would be around 200ms
Are we talking about going from normal to busy, or busy back to normal? I think we can't put a delay before for normal to busy, because even if we wait 200ms, what if the runnable is finished at 201ms, the flashing will still appear. Correct me if I'm wrong here, I might just be confused.
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #4) > Are we talking about going from normal to busy, or busy back to normal? > > I think we can't put a delay before for normal to busy, because even if we > wait 200ms, what if the runnable is finished at 201ms, the flashing will > still appear. Correct me if I'm wrong here, I might just be confused. I think it might reduce the flashing. Lets say a perspective switch takes normally 120 ms. At the moment the cursor flashes always during switch. If we could allow a default delay or a delay which can be set during the call of BusyIndicator, most perspective switch operations would not change the cursor only if a switch takes longer the cursor would change. A duration of a little more than > 200 would still flash but I think it would be better than currently as currently it always flashes.
I have tried to implementing this, but putting a delay on the setting the busy cursor but the problem is that we don't have access to the status of the runnable. With the current setup, there is no way for some sort of signal/callback structure that can be used to setup a signal for when the thread has passed a certain point to switch to the busy cursor. I have tried a TimerTask but the problem is that the it is running on a different thread & causes a SWTException.