Repository navigation
Conversation
Signed-off-by: Narfinger <[email protected]>
61741b3 to
bedeb34
Compare
Signed-off-by: Narfinger <[email protected]>
ecd4e3d to
7aa03f0
Compare
|
Saving on shutdown won't help much on mobile where the app can be killed willy-nilly, and also in other situations like Beaver in "session" mode which is never shutdown. |
|
What would be a better way to do this? |
I thought the general setup would be something along these lines:
|
|
There was discussion in #43819 about the design. I am not sure how to change it now, as it took quite a bit of time to get it reviewed and merged. |
|
I agree that saving disk cache on shutdown is not a valid long term solution. If this lands as-is, it will need to be rewritten. Crashes, the OOM killer, and mobile operating systems should not interfere with disk cache. cc @janvarga who has a lot of storage experience. |
|
I opened a zulip discussion #general > DiskCache design and saving. because I am kind of at a loss what to do now. |
Sorry for the late reply, I somehow missed this discussion. I agree with the concerns here. From our experience with Firefox, doing too much I/O during shutdown is something we should try to avoid. We had quite a few issues with shutdown taking too long, sometimes leading to hangs or crashes. There is also the mobile aspect. On Android especially, we learned the hard way that shutdown cannot be relied on, since the application can be terminated without having a chance to shut down properly. I think it would be better if Servo had a memory/disk cache design that doesn't depend on shutdown for saving data, ideally doing very little I/O during shutdown, or none at all. |
|
Closing because a functionality in NetworkManager exists to store the cache to disk. |
Need to do performance measurements.
This stores the memory cache to disk on shutdown if the disk cache is enabled.
On start of the browser the entries will be automatically promoted to the memory cache if used.
We also remove the second type parameter from async_runtime::spawn_blocking as it is not needed.
Testing: No automated test exist but this was manually verified.