Re: What does Opera do when it's shutting down?
Eirik Byrkjeflot Anonsen <[email protected]> Wed, 11 May 2011 08:40:32 +0200
| Newsgroups | gmane.comp.web.opera.linux |
|---|---|
| Message-ID | <[email protected]> |
Kenneth Crudup <[email protected]> writes: > I know this behavior has been part of the way Opera works for a while > now, and I've always been meaning to ask. > > So, I shut down an Opera session (latest Beta) about 5 minutes ago, > but it's still in "ps" and still cranking away at the disk (it had > accumulated a large-enough RSS and VIRT memory footprint, but nothing too > excessive). > > Is it writing out the cache DB? Even if it were dumping all 2.5GB of its > memory space it shouldn't be taking this long just to exit (which is will, > eventually). > > I do have "Memory Cache" set to "Automatic" and the number of history > items set to max, but still .... > > -Kenny Very good question. We would also dearly like to know. We know that Opera sometimes spends way too much time starting up and/or shutting down. But speaking for myself, I seem to never have this problem when I'm in a position to debug it :( One thing that is an annoying issue is that Opera tries to be a well-behaved program and properly clean up after itself. In particular, we try to release all the memory we have allocated. This is rather pointless on modern, sane desktop systems, as they will take care of any leftover leaks when the process exits. However, it is rather important on some "embedded" systems. A side effect of this is that opera will pretty much touch all the memory of the Opera process while looking for things to free. Probably several times. Which can lead us to the "extremely bad case", where Opera's memory footprint is too big for physical memory, leading to excessive swapping. I don't think Opera usually have a lot of uncommitted data to write to the disk cache on exit. So I would not expect that to take very long. But I guess it is possible that Opera would decide to do some maintenance on some of the on-disk data structures on shutdown. I would think that could potentially be quite costly (but that is a wild guess on my part and may be completely off the mark). Finally, note that while 2.5G shouldn't take that long to write to disk, I think you'd be surprised at just how slow writing to disk can become if it is done in small pieces spread out over the disk. (I accidentally managed to fragment a moderately large file pretty badly quite a few years ago. It took more than ten times as long to read the file as a similarly sized, unfragmented file.) eirik -- Opera-Linux: https://list.opera.com/mailman/listinfo/opera-linux More lists: https://list.opera.com/mailman/listinfo/ Unsubscribe: mailto:[email protected]?subject=unsubscribe