emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request for review: Doing direct file I/O in Emacs Lisp


From: Stefan Monnier
Subject: Re: request for review: Doing direct file I/O in Emacs Lisp
Date: 10 May 2004 14:21:54 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> FWIW … while working on an RTF reader I found it very annoying that I
> have to insert the entire RTF file into a buffer, then tokenize it
> character-wise, then delete that parts of the buffer that are
> recognized as markup, applying text properties to the remaining text
> as appropriate.

> Being able to fetch characters from a stream, and deal with them
> through several layers of abstraction, and then inserting the actual
> text with properties into a buffer would be much nicer and cleaner.

While I like code to be functional, I must say that from a memory management
point of view, buffer modifications are significantly more efficient than
string manipulation.
So the other approach you suggest might indeed be cleaner, but it might
also turn out to stress Emacs's GC too hard and the performance might suck.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]