Option to save on focus-out only

Bug #1039257 reported by Tom Beckmann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Low
Unassigned

Bug Description

I'd suggest to only save on focus-out, since it practically makes no difference, it just reduces the number of writes.
Using Scratch heavily often makes my computer do weird noises.

Related branches

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I really appreciate the disaster-proof nature of Scratch file saving. And data integrity is typically valued more than performance; for example, disabling all the data integrity mechanisms in the file system yields a ~5x performance boost, yet nobody does that.

However, laptops have built-in UPS (battery) and dislike frequent disk writes for power usage reasons, so maybe we could detect if a battery is present and disable save-as-you-type. But even then I'd use saving every 30 seconds or so instead of completely disabling it.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

We could still add something like a 10s timeout after inactivity for doing an autosave, but not on every single key stroke I think.

Revision history for this message
Mario Guerriero (mefrio-g) wrote :

autosave how it is now must remain in Scratch. I can add an alternative to it however just saving files where the SourceView is focused out.

Changed in scratch:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 1.2
Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Sounds good. I consider this bug's priority pretty high though, my old computer doesn't really like constant saves :(

summary: - Save on focus out only
+ Option to save on focus-out only
Changed in scratch:
milestone: 2.0 → 2.1
Changed in scratch:
milestone: 2.0.1 → 2.1
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I've added saving on focus-out and increased the typing break saving timeout to 3 seconds. This should fix the original issue while still maintaining a decent degree of crash-proofness.

Looking at how stable Scratch has been recently, it might be a better idea to move away from the typing break timeout and just save the file every 30 seconds or so if the was changed (and keep the saving on focus-out, of course).

Revision history for this message
Cody Garver (codygarver) wrote :

Sounds like Fix Committed

Changed in scratch:
status: Confirmed → Fix Committed
Changed in scratch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.