[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vlf f4526a1 287/310: Forbid short-cutting in line searc
From: |
Stefan Monnier |
Subject: |
[elpa] externals/vlf f4526a1 287/310: Forbid short-cutting in line search. |
Date: |
Sat, 28 Nov 2020 00:33:33 -0500 (EST) |
branch: externals/vlf
commit f4526a1492a799e671b0efbe044e3720b0aa0b0f
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>
Forbid short-cutting in line search.
---
vlf-search.el | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/vlf-search.el b/vlf-search.el
index a6a9808..89420c3 100644
--- a/vlf-search.el
+++ b/vlf-search.el
@@ -256,19 +256,19 @@ Search is performed chunk by chunk in `vlf-batch-size'
memory."
(inhibit-read-only t))
(setq n (1- n))
(vlf-with-undo-disabled
- (while (and (< (- end start) n)
- (< n (- vlf-file-size start)))
- (erase-buffer)
- (vlf-tune-insert-file-contents-literally start end)
- (goto-char (point-min))
- (while (re-search-forward "[\n\C-m]" nil t)
- (setq n (1- n)))
- (vlf-verify-size)
- (vlf-tune-batch '(:raw))
- (setq start end
- end (min vlf-file-size (+ start
- vlf-batch-size)))
- (progress-reporter-update reporter start))
+ ;; (while (and (< (- end start) n)
+ ;; (< n (- vlf-file-size start)))
+ ;; (erase-buffer)
+ ;; (vlf-tune-insert-file-contents-literally start end)
+ ;; (goto-char (point-min))
+ ;; (while (re-search-forward "[\n\C-m]" nil t)
+ ;; (setq n (1- n)))
+ ;; (vlf-verify-size)
+ ;; (vlf-tune-batch '(:raw))
+ ;; (setq start end
+ ;; end (min vlf-file-size (+ start
+ ;; vlf-batch-size)))
+ ;; (progress-reporter-update reporter start))
(when (< n (- vlf-file-size end))
(vlf-tune-batch '(:insert :encode))
(vlf-move-to-chunk-2 start (+ start vlf-batch-size))
@@ -278,8 +278,7 @@ Search is performed chunk by chunk in `vlf-batch-size'
memory."
(when (vlf-re-search "[\n\C-m]" n nil 0
reporter time)
(forward-char) t))))))
- (let ((start (max 0 (- vlf-file-size vlf-batch-size)))
- (end vlf-file-size)
+ (let ((end vlf-file-size)
(reporter (make-progress-reporter
(concat "Searching for line -"
(number-to-string n) "...")
@@ -287,17 +286,18 @@ Search is performed chunk by chunk in `vlf-batch-size'
memory."
(inhibit-read-only t))
(setq n (- n))
(vlf-with-undo-disabled
- (while (and (< (- end start) n) (< n end))
- (erase-buffer)
- (vlf-tune-insert-file-contents-literally start end)
- (goto-char (point-max))
- (while (re-search-backward "[\n\C-m]" nil t)
- (setq n (1- n)))
- (vlf-tune-batch '(:raw))
- (setq end start
- start (max 0 (- end vlf-batch-size)))
- (progress-reporter-update reporter
- (- vlf-file-size end)))
+ ;; (let ((start (max 0 (- vlf-file-size vlf-batch-size))))
+ ;; (while (and (< (- end start) n) (< n end))
+ ;; (erase-buffer)
+ ;; (vlf-tune-insert-file-contents-literally start end)
+ ;; (goto-char (point-max))
+ ;; (while (re-search-backward "[\n\C-m]" nil t)
+ ;; (setq n (1- n)))
+ ;; (vlf-tune-batch '(:raw))
+ ;; (setq end start
+ ;; start (max 0 (- end vlf-batch-size)))
+ ;; (progress-reporter-update reporter
+ ;; (- vlf-file-size end))))
(when (< n end)
(vlf-tune-batch '(:insert :encode))
(vlf-move-to-chunk-2 (- end vlf-batch-size) end)
- [elpa] externals/vlf bc398d6 291/310: - don't adjust start on next occur batch, (continued)
- [elpa] externals/vlf bc398d6 291/310: - don't adjust start on next occur batch, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf a01e9ed 304/310: Minor README additions., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 31b292d 305/310: fixed large-file-warning-threshold error, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 63d23ac 309/310: Make vlf handle nil large-file-warning-threshold value, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 70a8107 243/310: Add vlf-batch-size tuning in vlf-occur., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf f3212ec 251/310: Fix measure approximation and allow tuning to just over half file, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 11c7af4 253/310: Change handling of measurement values to support approximations., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 35ede94 255/310: Restore batch size after save with adjustment., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ff06509 261/310: Document tune functionality., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 1c961f4 285/310: Fix whole file reload in read-only buffer on vlf-mode exit., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf f4526a1 287/310: Forbid short-cutting in line search.,
Stefan Monnier <=
- [elpa] externals/vlf fd90b3a 295/310: Use xdigit regex class in vlf-hexl-adjust-addresses., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf df677c1 302/310: Issue 35: make mode-line batch indicators more accurate, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf a568d2d 307/310: packages/vlf: Update copyright dates and bump version., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 0ecb40a 124/310: Keep as much editing as possible when moving to intersecting chunk., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 86223ed 234/310: Fixes to hexl-mode integration., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 9271f68 256/310: Add function to linearly search best batch size according to existing, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 0d2c096 258/310: Restore batch size and hexl mode in case of failed search or occur., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf b918791 265/310: Improve vlf performance with hexl-mode. Align batches to hexl-bits, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 2e9ff70 238/310: Enlarge default batch size but keep is small on initial load of remote, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf d85f3d4 246/310: Fix access to uninitialized measurements when tuning., Stefan Monnier, 2020/11/28