I want to repeat Eliot's suggestion below because it seems to me a very good design approach. I'm going to tinker with the idea off line (not in any SqueakSource image). I'm also interested in the idea of doing the saving work in a separate forkSqueak OSProcess to let it run at low priority, and with little or no performance impact on multi-core platforms. Just mentioning it here because the overall approach that Eliot describes below seems right to me.

Dave

On 2024-03-28 15:25, Eliot Miranda wrote:

Hi Dave, Hi All,
<snip>
 
So introduce a queue for save requests and service them in a lower priority process than the processes serving user requests. Interaction is with the in-image model. The lower priority process going saves can elide intervening saves if it gets behind, so the system saves as often as necessary when lightly loaded and as often as possible while prioritizing user responsiveness when heavily loaded.
 
If the model needs to be locked while setialising then take a copy (which will be shallow at the leaves, deep in the branches, because only changeable data needs to be shallow copied), and serialise the copy. The copy operation should be much faster than the serialisation.
 
I'd happily collaborate on this but I need pointers to the code and instructions on how to interact with the running server.
 
Best, Eliot
_,,,^..^,,,_ (phone)