unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#917: Too heavy consing in MULE file saving?
@ 2008-09-07 17:40 Richard M. Stallman
  2008-09-07 19:01 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2008-09-07 17:40 UTC (permalink / raw)
  To: emacs-pretest-bug

I have gc-cons-threshold at 400000, which is the default.
In Rmail, if I type d u C-x C-s, it causes a GC at the end
of saving.  I can do this over and over and it GCs every time.

I think this indicates a bug; namely, that something is doing too much
consing.

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.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#917: Too heavy consing in MULE file saving?
  2008-09-07 17:40 bug#917: Too heavy consing in MULE file saving? Richard M. Stallman
@ 2008-09-07 19:01 ` Eli Zaretskii
  2008-09-08  9:22   ` Richard M. Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2008-09-07 19:01 UTC (permalink / raw)
  To: rms, 917; +Cc: emacs-pretest-bug

> From: "Richard M. Stallman" <rms@gnu.org>
> 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.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#917: Too heavy consing in MULE file saving?
  2008-09-07 19:01 ` Eli Zaretskii
@ 2008-09-08  9:22   ` Richard M. Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard M. Stallman @ 2008-09-08  9:22 UTC (permalink / raw)
  To: Eli Zaretskii, 917; +Cc: 917, emacs-pretest-bug, bug-gnu-emacs, bug-submit-list

    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.

It seems to be a recent change, so I think it is worth investigating
whether something just increased the amount of consing done by encoding.
It would be worth optimizing this.








^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-08  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07 17:40 bug#917: Too heavy consing in MULE file saving? Richard M. Stallman
2008-09-07 19:01 ` Eli Zaretskii
2008-09-08  9:22   ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).