From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
To: help-gnu-emacs@gnu.org
Subject: Re: opening large files (few hundred meg)
Date: Thu, 31 Jan 2008 22:55:06 +0000 (UTC) [thread overview]
Message-ID: <fntjka$2smi$1@agate.berkeley.edu> (raw)
In-Reply-To: mailman.6646.1201548710.18990.help-gnu-emacs@gnu.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
[A complimentary Cc of this posting was sent to
Eli Zaretskii
<eliz@gnu.org>], who wrote in article <mailman.6646.1201548710.18990.help-gnu-emacs@gnu.org>:
> > > • is there a general solution to work with files (elisp) without
> > > actually loading the whole file?
> > Not really, since visiting a file reads all of it into an Emacs buffer.
> The problem is not with the buffer size per se, it's with the fact
> that Emacs needs to be able to address each byte of the file's text
> with an Emacs integer data type, which is 29 bit wide on 32-bit
> machines.
Are you sure? I think it should be enough to address each char in the
buffer, plus 2 "guard zones" immediately before and after the buffer,
plus two "guard zones" at start and end of the file.
E.g., if the guard zone size is 1MB, then the "actual chunk of file"
goes from offset 2M to offset 126M in the buffer; accessing anything
from offset 1M to 2M "scrolls back" the chunk; accessing anything from
offset 0 to 1M loads the chunk at start of file, etc.
Why won't this work?
Yours,
Ilya
next prev parent reply other threads:[~2008-01-31 22:55 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 17:35 opening large files (few hundred meg) Xah Lee
2008-01-28 18:05 ` Sven Joachim
2008-01-28 19:31 ` Eli Zaretskii
2008-01-28 20:36 ` Andreas Röhler
[not found] ` <mailman.6652.1201552566.18990.help-gnu-emacs@gnu.org>
2008-01-28 21:50 ` Jason Rumney
2008-01-29 7:07 ` Andreas Röhler
2008-01-29 7:20 ` Thierry Volpiatto
[not found] ` <mailman.6666.1201591238.18990.help-gnu-emacs@gnu.org>
2008-01-29 9:08 ` Tim X
2008-01-29 16:34 ` Xah Lee
2008-01-29 19:06 ` Tom Tromey
2008-01-29 20:44 ` Eli Zaretskii
[not found] ` <mailman.6705.1201639469.18990.help-gnu-emacs@gnu.org>
2008-01-30 20:01 ` Stefan Monnier
2008-01-30 22:04 ` Eli Zaretskii
2008-01-29 22:10 ` Jason Rumney
2008-01-30 17:08 ` Joel J. Adamson
2008-01-31 5:57 ` Tim X
2008-01-31 15:35 ` Stefan Monnier
2008-02-08 11:25 ` Giacomo Boffi
2008-02-06 1:47 ` Samuel Karl Peterson
2008-01-29 14:52 ` Joel J. Adamson
2008-01-30 14:55 ` Stefan Monnier
2008-02-06 16:42 ` Mathias Dahl
2008-02-06 16:55 ` Mathias Dahl
2008-01-29 10:43 ` Johan Bockgård
2008-01-29 15:35 ` Andreas Röhler
2008-02-06 1:25 ` Samuel Karl Peterson
2008-02-17 16:01 ` Kevin Rodgers
2008-01-29 16:33 ` Ted Zlatanov
[not found] ` <mailman.6646.1201548710.18990.help-gnu-emacs@gnu.org>
2008-01-30 15:12 ` Stefan Monnier
2008-01-30 16:55 ` Sven Joachim
2008-01-30 21:53 ` Stefan Monnier
2008-01-31 22:55 ` Ilya Zakharevich [this message]
[not found] ` <200801312255.m0VMt701019096@powdermilk.math.berkeley.edu>
2008-02-01 11:04 ` Eli Zaretskii
[not found] ` <mailman.6836.1201863892.18990.help-gnu-emacs@gnu.org>
2008-02-01 22:26 ` Ilya Zakharevich
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='fntjka$2smi$1@agate.berkeley.edu' \
--to=nospam-abuse@ilyaz.org \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.