From: Wolfgang Jenkner <wjenkner@inode.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19393@debbugs.gnu.org
Subject: bug#19393: 25.0.50; Emacs cannot determine coding system of ISO-8859 encoded files
Date: Sat, 20 Dec 2014 04:21:54 +0100 [thread overview]
Message-ID: <85vbl7qa3x.fsf@iznogoud.viz> (raw)
In-Reply-To: <83tx0suajy.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Dec 2014 19:34:09 +0200")
On Thu, Dec 18 2014, Eli Zaretskii wrote:
> Then it's probably some inefficiency in insert-file-contents, when it
> is called to revert a buffer. If you have time, please take a look
> what happens there, I suspect we reallocate the buffer in very small
> chunks, instead of doing it with larger increments. (With compressed
> files, it's hard to do, because the size of the uncompressed file is
> not known in advance.)
I have been looking into this with dtrace and what is sure is that
a large amount of data (increasing up to the order of magnitude of the
buffer size) is memcpy'd again and again as a result of mmap_realloc
being called by enlarge_buffer_text. Apparently, the latter is called
for buffer gap handling which is triggered by decode_coding_c_string (or
rather decode_coding_object) in insert-file-contents. So it seems that
the effect on memory of this innocent-looking loop there is enormously
magnified.
But I have to look at the source more closely (not that I expect to get
any idea how to fix this, though).
next prev parent reply other threads:[~2014-12-20 3:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 15:21 bug#19393: 25.0.50; Emacs cannot determine coding system of ISO-8859 encoded files Tassilo Horn
2014-12-16 16:05 ` Eli Zaretskii
2014-12-16 16:20 ` Eli Zaretskii
2014-12-16 19:22 ` Tassilo Horn
2014-12-16 19:10 ` Tassilo Horn
2014-12-16 16:39 ` martin rudalics
2014-12-16 19:26 ` Tassilo Horn
2014-12-16 16:56 ` Andreas Schwab
2014-12-16 18:49 ` Wolfgang Jenkner
2014-12-16 19:36 ` Tassilo Horn
2014-12-17 14:22 ` Wolfgang Jenkner
2014-12-17 15:50 ` Eli Zaretskii
2014-12-17 16:02 ` Wolfgang Jenkner
2014-12-17 17:03 ` Eli Zaretskii
2014-12-18 1:47 ` Wolfgang Jenkner
2014-12-18 16:22 ` Eli Zaretskii
2014-12-18 16:36 ` Wolfgang Jenkner
2014-12-18 17:34 ` Eli Zaretskii
2014-12-20 3:21 ` Wolfgang Jenkner [this message]
2014-12-20 7:27 ` Eli Zaretskii
2015-01-13 14:06 ` Wolfgang Jenkner
2015-01-13 16:25 ` Eli Zaretskii
2015-01-13 17:12 ` Wolfgang Jenkner
2015-01-13 17:31 ` Eli Zaretskii
2015-01-14 19:41 ` Wolfgang Jenkner
2015-01-15 13:38 ` Wolfgang Jenkner
2015-01-15 16:08 ` Stefan Monnier
2015-01-15 17:00 ` Wolfgang Jenkner
2020-09-07 21:30 ` Lars Ingebrigtsen
2020-09-10 0:43 ` Wolfgang Jenkner
2020-09-10 13:17 ` Lars Ingebrigtsen
2014-12-17 15:12 ` Wolfgang Jenkner
2014-12-17 15:46 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85vbl7qa3x.fsf@iznogoud.viz \
--to=wjenkner@inode.at \
--cc=19393@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).