Commit a728aa90 authored by Richard M. Stallman's avatar Richard M. Stallman

(tar-summarize-buffer): Speed-up for large files.

parent e852d58d
......@@ -461,11 +461,16 @@ is visible (and the real data of the buffer is hidden)."
(message "Warning: premature EOF parsing tar file")))
(goto-char (point-min))
(let ((buffer-read-only nil))
(let ((buffer-read-only nil)
(summaries nil))
;; Collect summary lines and insert them all at once since tar files
;; can be pretty big.
(tar-dolist (tar-desc tar-parse-info)
(tar-header-block-summarize (tar-desc-tokens tar-desc)))
(insert-string "\n"))
(setq summaries
(cons (tar-header-block-summarize (tar-desc-tokens tar-desc))
(cons "\n"
(insert (apply 'concat summaries))
(make-local-variable 'tar-header-offset)
(setq tar-header-offset (point))
(narrow-to-region 1 tar-header-offset)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment