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

Commit 29630de

Browse files
Merge pull request #2043 from livecode/bugfix-21885
Prevent unnecessary disk writes of revPreferences stack
2 parents 8e26cd5 + b0bd839 commit 29630de

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Toolset/home.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ local sSavePreferencesMessage
907907

908908
command revInternal__SavePreferences
909909
cancel sSavePreferencesMessage
910-
send "__revInternal_SavePreferences" to me in 500 milliseconds
910+
send "__revInternal_SavePreferences" to me in 30 seconds
911911
put the result into sSavePreferencesMessage
912912
end revInternal__SavePreferences
913913

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,9 +2280,11 @@ Example: set revIDEGetPreference("text size") to 12
22802280
Returns (Any): The value of the preference
22812281
*/
22822282
on revIDESetPreference pPreferenceName, pValue
2283-
set the pPreferenceName of stack "revpreferences" to pValue
2284-
revInternal__SavePreferences
2285-
ideMessageSend "idePreferenceChanged:" & pPreferenceName,pValue
2283+
if the pPreferenceName of stack "revpreferences" is not pValue then
2284+
set the pPreferenceName of stack "revpreferences" to pValue
2285+
revInternal__SavePreferences
2286+
ideMessageSend "idePreferenceChanged:" & pPreferenceName,pValue
2287+
end if
22862288
end revIDESetPreference
22872289

22882290
command revIDESetPreferenceOfSet pSetName, pPreferenceName, pValue

notes/bugfix-21885.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Prevent unnecessary disk writes of revPreferences stack that can cause slowdown on Windows

0 commit comments

Comments
 (0)