Closing browser window causes disk thrashing due to writing out entire bookmarks file, and using excessive fsyncing

RESOLVED DUPLICATE of bug 101319

Status

SeaMonkey
Bookmarks & History
RESOLVED DUPLICATE of bug 101319
16 years ago
14 years ago

People

(Reporter: Gareth Randall, Assigned: Ben Goodger (use ben at mozilla dot org for email))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1) Gecko/20021130

Mozilla writes out the entire bookmarks file every time a browser window (not a
tab) is closed. I have determined this using "strace". I get hundreds of lines
like this:

write(24, "<!DOCTYPE NETSCAPE-Bookmark-file"..., 4096) = 4096
fsync(24)
....

close(24)
and later a rename.

Basically, calling "fsync" after each 4096 byte lump, causes a long delay (up to
2 seconds) on journalled filesystems and doesn't seem to be necessary. This
causes a long wait upon closing a browser window, or a pop-up for instance.

(In fact, is it even necessary to write the bookmarks out for each close anyway?)


Reproducible: Always

Steps to Reproduce:
1. Attach a tracer using "strace -p [first Mozilla PID]"
2. Open a new browser window. (Ctrl+N)
3. Close the same browser window.
4. Observe the time lag, and huge stream of disk writes in strace.

Actual Results:  
See description.

Expected Results:  
Not called fsync after each partial write.

*** This bug has been marked as a duplicate of 101319 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.