Suggestion: cache windows or web views

Opening edit window or browser takes 2-3 seconds on my laptop (this is without addons). I suggest caching either entire windows (hiding them instead of fully closing) or only web views (these are the ones that take the most time to draw, should be easier to implement maybe?) to speed up the workflow.

AFAIAA it’s almost all down to the webview. Caching is probably possible, though it would mean memory is not freed up as windows are closed, and we’d need some system to keep a pool of views/shrink the pool over time. Qt also allows you to control whether things are isolated per-site or per-instance, but when I last tried it, it didn’t seem to have a noticeable impact on startup time.

I imagine that the system provides a callback that’s called when the system is low on memory.

FWIW, when tinkering with the Edit dialog for AnkiConnect/Yomichan, I also tried caching the entire window. It worked quite well, unsurprisingly, except that because I did in the dumbest way possible, there was a problem with the window displaying stale data before switching to the new one. I suppose that this way could also cause issues with some of the addons. Probably unnecessary since caching the web views should sufficiently improve the startup time but certainly a possibility.