1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 12:05:31 +00:00

Don't measure encoding of too small region when adjusting chunk start

and fix passing of elements to tune in vlf-occur.
This commit is contained in:
Andrey Kotlarski 2014-09-04 15:26:25 +03:00
parent d67825c4cd
commit 0d9cc8e488
2 changed files with 5 additions and 3 deletions

View File

@ -308,8 +308,10 @@ Return number of bytes moved back for proper decoding."
(not (zerop safe-start)))
(< shift 3)
(let ((diff (- chunk-size
(vlf-tune-encode-length position
(point-max)))))
(length
(encode-coding-region
position (point-max)
buffer-file-coding-system t)))))
(if strict
(not (zerop diff))
(or (< diff -3) (< 0 diff)))))

View File

@ -202,7 +202,7 @@ Prematurely ending indexing will still show what's found so far."
(time (float-time))
(tune-types (let ((base '(:insert :encode)))
(if is-hexl
(nconc '(:hexl :dehexlify) base)
(append '(:hexl :dehexlify) base)
base)))
(reporter (make-progress-reporter
(concat "Building index for " regexp "...")