Watchdog autosave feature causes performance problems #13098
Labels
squad:collaboration
Issue to be handled by the Collaboration team.
support:2
An issue reported by a commercially licensed client.
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
馃摑 Provide a description of the improvement
One of the most important Watchdog feature is restarting the editor when there is an unhandled error. To prevent losing the editor data, the watchdog internally saves the editor data, so it is able to restore it after the editor is restarted.
The problem is that this can lead to performance problems. The saving is done differently than in autosave feature. Instead of debouncing the save event on editor change (as in autosave), the watchdog throttles it. This means that for big documents, there will be a lag on first typed character and then after every 5 seconds as the user keeps on typing.
This puts further pressure on applications which handle big documents and additionally use autosave feature.
What's more, saving data by watchdog does not make any sense if the editor is used in real-time environment as the data is taken from the remote CS session anyway. But there's no setting to prevent the saves. This can be probably "hacked" by setting
saveInterval
to2147483647
(this is the biggest value that can be used in JS timeouts). This should be either described in the documentation or even maybe watchdog should overwrite this setting if RTC is used.One possible way to improve watchdog performance is to save model state (+markers) instead of document data. Since we are restarting the editor using the same configuration, it should be safe to use the model and it should be faster to save and re-init the editor. One problem here is that incorrectly implemented custom features may be saving some important data outside of the model (this can happen in non-RTC integrations, as in RTC applications this kind of bug should can show up faster as the non-model data is not shared among users).
The text was updated successfully, but these errors were encountered: