Commit 0a71ed1a authored by David Byers's avatar David Byers
Browse files

Parser speedups. lv works again.

parent 3c0ddad5
1999-06-12 David Byers <davby@ida.liu.se>
* commands1.el (lyskom-who-is-on-check-membership-9): Don't
extract pers-nos from member list.
(lyskom-who-is-on-check-membership-8): Same here.
Speed up parsing:
* parse.el (lyskom-parse-string): Reset lyskom-string-bytes-missing after
successful parse. Set lyskom-string-bytes-missing in the lyskom
buffer, not the parse buffer.
(lyskom-parse-unparsed): Do not reset lyskom-string-bytes-missing.
(lyskom-init-parse): Reset lyskom-string-bytes-missing.
1999-04-01 David Byers <davby@ida.liu.se>
* vars.el.in (kom-postpone-default): Ny variabel.
......
......@@ -2371,8 +2371,6 @@ Uses Protocol A version 9 calls"
(len (length who-info-list))
(i 0)
(res nil))
(setq members (mapcar 'member->conf-no
(append (member-list->members members))))
(while (< i len)
(if (lyskom-member-list-find-member
(who-info->pers-no (aref who-info-list i))
......@@ -2388,8 +2386,6 @@ Uses Protocol A version 9 calls"
(len (length who-info-list))
(i 0)
(res nil))
(setq members (mapcar 'member->conf-no
(append (member-list->members members))))
(while (< i len)
(if (lyskom-member-list-find-member
(dynamic-session-info->person (aref who-info-list i))
......
......@@ -152,13 +152,14 @@ Signal lyskom-protocol-error if the next token is not a string."
(setq lyskom-parse-pos (+ lyskom-parse-pos end))
(cond
((< (point-max) (+ lyskom-parse-pos len))
(setq lyskom-string-bytes-missing
(lyskom-setq-default lyskom-string-bytes-missing
(- (+ lyskom-parse-pos len)
(point-max)))
(signal 'lyskom-parse-incomplete nil))
(t
(prog1 (buffer-substring lyskom-parse-pos
(+ lyskom-parse-pos len))
(lyskom-setq-default lyskom-string-bytes-missing 0)
(setq lyskom-parse-pos (+ lyskom-parse-pos len))))))))))
......@@ -987,6 +988,7 @@ i.e creates the buffer, sets all markers and pointers."
(setq lyskom-proc proc)
(make-local-variable 'lyskom-buffer)
(setq lyskom-buffer buffer)
(lyskom-setq-default lyskom-string-bytes-missing 0)
(goto-char (point-max))
(point-marker)))))
......@@ -1105,7 +1107,6 @@ functions and variables that are connected with the lyskom-buffer."
(message ""))))
(lyskom-save-excursion
(set-buffer lyskom-unparsed-buffer)
(setq lyskom-string-bytes-missing 0)
(while (not (zerop (1- (point-max)))) ;Parse while replies.
(let* ((lyskom-parse-pos 1)
(key (lyskom-parse-nonwhite-char)))
......
......@@ -1445,7 +1445,9 @@ This is used to prevent parallell parsing since the parser is not reentrant."
Set when parsing a string and there were not enough bytes in the buffer
with the unparsed bytes. This variable is used to prevent reparsing before
the string is complete.
This variable is buffer-local in the unparsed-buffer.")
This variable is buffer-local in the unparsed-buffer."
local
inherited)
(def-kom-var lyskom-last-viewed 0 ;
"Postition of the first char of the last line that the user has had
......
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