Subject: Re: bug#917: Too heavy consing in MULE file saving?

From: Eli Zaretskii <[email-masked]>
Date: Sun, 07 Sep 2008 22:01:14 +0300

> From: "Richard M. Stallman" <[email-masked]>
> Date: Sun, 07 Sep 2008 13:40:00 -0400
> Cc: 
> 
> My Rmail file is around 10 meg, and has 471 messages.
> But I don't see why that should matter for C-x C-s.
> 
> Just to explore, I visited another 10meg file in Fundamental mode
> and got the same behavior.  I went to the end and type 1 DEL C-x C-s.
> It gc's each time.
> 
> Then I tried visiting it with find-file-literally.
> That way, I could type 1 DEL C-x C-s and it would save without gc.
> 
> So I think something concerned with Mule is doing too much consing.

I'm not surprised: saving a file visited non-literally causes its
contents to be encoded, which generally means we wipe out the text and
replace it with its encoded representation.  That this conses _a_lot_,
especially for large files, does not come as a surprise to me.
Perhaps I'm missing something, though.