Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit dda9b6c

Browse files
committed
[[ Bug ]] Throttle extensionsChanged messages
A delay after loading the ide was caused by buildup of ideExtensionsChanged messages due to the extensions loaded on startup. Throttle them.
1 parent a1d0a9d commit dda9b6c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Toolset/libraries/revideextensionlibrary.livecodescript

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,17 @@ private command __extensionError pCacheIndex, pErrorMessage
720720
end __extensionError
721721

722722
# Send notication that widget has been added/removed
723+
on doExtensionsChanged
724+
ideMessageSend "ideExtensionsChanged"
725+
end doExtensionsChanged
726+
727+
local sExtensionsChangedMsg
723728
private command __extensionsChanged
724-
send "ideMessageSend ideExtensionsChanged" to stack \
725-
"revIDELibrary" in 0 millisecs
729+
if sExtensionsChangedMsg is not empty then
730+
cancel sExtensionsChangedMsg
731+
end if
732+
send "doExtensionsChanged" to me in 10 millisecs
733+
put the result into sExtensionsChangedMsg
726734
end __extensionsChanged
727735

728736
# Sent progress update on installation of widget

0 commit comments

Comments
 (0)