Closed Bug 801437 Opened 13 years ago Closed 13 years ago

ensure_copy loads the entire file into memory before writing it out.

Categories

(Toolkit :: Application Update, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Details

Attachments

(1 file, 1 obsolete file)

On Nightly with OS X this is a cause for sadness because XUL is 1GB in size. I should be able to come up with a patch for this.
Attached patch Improve the ensure_copy code (obsolete) — Splinter Review
Attachment #671520 - Flags: review?
Attachment #671520 - Flags: review? → review?(ehsan)
Comment on attachment 671520 [details] [diff] [review] Improve the ensure_copy code Review of attachment 671520 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/update/updater/updater.cpp @@ +620,5 @@ > } > return 0; > #else > + > +#ifdef XP_UNIX This change does not seem correct. @@ +647,5 @@ > return WRITE_ERROR; > } > > + // This block size was chosen pretty arbitrarily but seems like a reasonable > + // compramise. The optimal block size on my OS X machine is 100k */ I don't think that you need to mention things about your machine in the code comments. Also, please fix the typo in "compromise." @@ +648,5 @@ > } > > + // This block size was chosen pretty arbitrarily but seems like a reasonable > + // compramise. The optimal block size on my OS X machine is 100k */ > + const int blockSize = 32768; Nit: 32 * 1024.
Attachment #671520 - Flags: review?(ehsan) → review-
Addresses review comments
Attachment #671520 - Attachment is obsolete: true
Attachment #677372 - Flags: review?(ehsan)
Comment on attachment 677372 [details] [diff] [review] Improve the ensure_copy code Review of attachment 677372 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: toolkit/mozapps/update/updater/updater.cpp @@ +644,5 @@ > } > > + // This block size was chosen pretty arbitrarily but seems like a reasonable > + // compromise. For example, the optimal block size on a modern OS X machine > + // is 100k */ Nit: s#*/##
Attachment #677372 - Flags: review?(ehsan) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: