Commit b0ed4c87 authored by David Kågedal's avatar David Kågedal
Browse files

Fixade en bug i prefetch-hanteringen.

parent 870d0e10
Wed May 1 20:53:30 1996 David Kgedal <davidk@lysator.liu.se>
* internal.el (lyskom-queue-collect-p): Kommenterade bort denna
funktion.
* services.el (z-initiate-get-map): Dito.
* commands1.el (lyskom-sub-member): Snkte inte
lyskom-last-conf-fetched som den borde.
Wed May 1 11:34:02 1996 David Byers <davby@sen2.ida.liu.se>
* english-strings.el,swedish-strings.el (lyskom-strings): Lade till
......
......@@ -10,7 +10,7 @@ Buggar
Prefetchhanteringen buggar. Om man går ur ett möte, går med i ett
möte, och går ur det igen, allt utan att göra något annat, så får
man ingen prompt. lyskom-last-conf-done hamnar i osynk.
man ingen prompt. lyskom-last-conf-done hamnar i osynk. (FIXAT)
sentinelmeddelanden i ikoniferade frames buggar. Prova att kasta
ut en session i ett ikonifierat fönster. Eller kanske till och med
......@@ -27,6 +27,10 @@ Buggar
Det har hänt att call-info har blivit nil i lyskom-parse-error.
lyskom-add-membership gör membership-listan sorterad, vilket inte
prefetch-koden är gjord för. Alltså borde det kunna bli problem
att gå med i möten om man ger dem fel prioritet.
Allmänna förbättringar
Inläggsnumren borde vara mer kontextkänsliga. Om man klickar på
......
......@@ -510,6 +510,7 @@ of the person."
(setq lyskom-current-conf 0)))
(if self
(progn
(-- lyskom-last-conf-fetched)
(-- lyskom-last-conf-received)
(-- lyskom-last-conf-done)))
(read-list-delete-read-info (conf-stat->conf-no conf)
......
......@@ -232,9 +232,10 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-format-insert 'conf-has-motd conf-stat)
(lyskom-view-text (conf-stat->msg-of-day conf-stat)))
; Show all members of CONF-STAT if the user so wishes."
;; Show all members of CONF-STAT if the user so wishes."
(lyskom-scroll)
(if (null (lyskom-j-or-n-p (lyskom-get-string 'show-members-list-also-q)))
(if (null (lyskom-j-or-n-p
(lyskom-get-string 'show-members-list-also-q)))
nil
(let ((member-list (blocking-do 'get-members
(conf-stat->conf-no conf-stat)
......
......@@ -262,29 +262,30 @@ Arguments: KOM-QUEUE REF-NO HANDLER HANDLER-DATA
parser parser-data handler handler-data))
;;; This is used by initiate-get-map. This is a temporary solution.
(defun lyskom-kom-queue-collect-p (queue-name)
"Return t if the kom-queue QUEUE-NAME has an unmatched 'COLLECT item.
It is illegal to call lyskom-collect or lyskom-collect-ignore-err on
the kom-queue if and only if this function returns t."
(let* ((queue (cdr-safe (assoc queue-name lyskom-call-data)))
(pending (lyskom-queue->all-entries (kom-queue->pending queue)))
(collect-flg nil)
(type nil))
(while (and queue pending)
(setq type (car (car pending)))
(setq pending (cdr pending))
(cond
((eq type 'COLLECT)
(setq collect-flg t))
((eq type 'COLLECT-IGNORE)
(setq collect-flg t))
((eq type 'USE)
(setq collect-flg nil))
((eq type 'LIST-USE)
(setq collect-flg nil))))
collect-flg))
;;; This is used by z-initiate-get-map, which is not used.
;;; This was a temporary solution.
;;(defun lyskom-kom-queue-collect-p (queue-name)
;; "Return t if the kom-queue QUEUE-NAME has an unmatched 'COLLECT item.
;;It is illegal to call lyskom-collect or lyskom-collect-ignore-err on
;;the kom-queue if and only if this function returns t."
;; (let* ((queue (cdr-safe (assoc queue-name lyskom-call-data)))
;; (pending (lyskom-queue->all-entries (kom-queue->pending queue)))
;; (collect-flg nil)
;; (type nil))
;; (while (and queue pending)
;; (setq type (car (car pending)))
;; (setq pending (cdr pending))
;; (cond
;; ((eq type 'COLLECT)
;; (setq collect-flg t))
;; ((eq type 'COLLECT-IGNORE)
;; (setq collect-flg t))
;; ((eq type 'USE)
;; (setq collect-flg nil))
;; ((eq type 'LIST-USE)
;; (setq collect-flg nil))))
;; collect-flg))
;;;; ================================================================
......@@ -403,15 +404,6 @@ is sent with each packet. If STRING is longer it is splitted."
(progn
(if lyskom-debug-communications-to-buffer
(lyskom-debug-insert process ">>>>>> " string))
;;; (save-excursion
;;; (set-buffer (get-buffer-create
;;; lyskom-debug-communications-to-buffer-buffer))
;;; (save-excursion
;;; (goto-char (point-max))
;;; (insert "\n"
;;; (format "%s" process)
;;; (concat ">>>>>> " string)))
;;; (set-buffer (process-buffer process)))
string)))
(t
(let ((i 0))
......@@ -463,28 +455,32 @@ RUN -> call function. Delete. Not allowed inside COLLECT/USE."
(setq type (car first-pending))
(cond
((eq type 'PARSED)
(kom-queue-halt queue)
(unwind-protect
(lyskom-apply-handler first-pending)
(kom-queue-resume queue))
(kom-queue-halt queue)
(unwind-protect
(lyskom-apply-handler first-pending)
(kom-queue-resume queue))
(if (or (eq (kom-queue->collect-flag queue) 'COLLECT)
(and (eq (kom-queue->collect-flag queue) 'COLLECT-IGNORE)
(car (cdr first-pending))))
(lyskom-queue-enter (kom-queue->collect-queue queue)
(car (cdr first-pending)))))
((eq type 'COLLECT)
(if (kom-queue->collect-flag queue)
(signal 'lyskom-internal-error
'("lyskom-check-call COLLECT."))
(set-kom-queue-collect-flag queue 'COLLECT)
(lyskom-queue-make-empty (kom-queue->collect-queue queue))))
((eq type 'COLLECT-IGNORE)
(if (kom-queue->collect-flag queue)
(signal 'lyskom-internal-error
'("lyskom-check-call COLLECT-IGNORE."))
(set-kom-queue-collect-flag queue 'COLLECT-IGNORE)
(lyskom-queue-make-empty (kom-queue->collect-queue queue))))
((eq type 'USE)
(if (not (kom-queue->collect-flag queue))
(signal 'lyskom-internal-error
......@@ -496,6 +492,7 @@ RUN -> call function. Delete. Not allowed inside COLLECT/USE."
(kom-queue->collect-queue queue)))
(kom-queue-resume queue))
(set-kom-queue-collect-flag queue nil))
((eq type 'LIST-USE)
(if (not (kom-queue->collect-flag queue))
(signal 'lyskom-internal-error
......@@ -507,6 +504,7 @@ RUN -> call function. Delete. Not allowed inside COLLECT/USE."
(kom-queue->collect-queue queue)))
(kom-queue-resume queue))
(set-kom-queue-collect-flag queue nil))
((eq type 'RUN)
(if (kom-queue->collect-flag queue)
(signal 'lyskom-internal-error
......@@ -515,6 +513,7 @@ RUN -> call function. Delete. Not allowed inside COLLECT/USE."
(unwind-protect
(lyskom-apply-function first-pending)
(kom-queue-resume queue)))
(t (signal 'lyskom-internal-error
(list 'lyskom-check-call
"unknown key:"
......
......@@ -389,30 +389,32 @@ with big maps."
(lyskom-format-objects 34 conf-no
first-local no-of-texts)))
(defun z-initiate-get-map (kom-queue handler conf-no first-local
no-of-texts &rest data)
"Get mapping from local to global text-nos for CONF-NO from server.
Args: KOM-QUEUE HANDLER CONF-NO FIRST-LOCAL NO-OF-TEXTS &rest DATA.
This function will automatically split fetching of big maps to small
chunks of lyskom-fetch-map-nos texts/chunk if KOM-QUEUE is not already
used to collect a result. This currently gives a big performance gain.
Unfortunately it is impossible (or at least very hard) to do the same
thing when a collect is in progress. This will of course be fixed in
protocol B."
(cond
((lyskom-kom-queue-collect-p kom-queue)
;; Use oldstyle single big map. Sorry.
(initiate-get-map kom-queue handler conf-no
first-local no-of-texts data))
(t
;; You win.
(lyskom-collect-ignore-err kom-queue)
(while (> no-of-texts 0)
(initiate-get-map kom-queue nil conf-no
first-local lyskom-fetch-map-nos data)
(setq first-local (+ lyskom-fetch-map-nos first-local))
(setq no-of-texts (- no-of-texts lyskom-fetch-map-nos)))
(lyskom-list-use kom-queue 'lyskom-receive-get-map handler data))))
;; As far as I can tell, this function is not used. /davidk
;;(defun z-initiate-get-map (kom-queue handler conf-no first-local
;; no-of-texts &rest data)
;; "Get mapping from local to global text-nos for CONF-NO from server.
;;Args: KOM-QUEUE HANDLER CONF-NO FIRST-LOCAL NO-OF-TEXTS &rest DATA.
;;This function will automatically split fetching of big maps to small
;;chunks of lyskom-fetch-map-nos texts/chunk if KOM-QUEUE is not already
;;used to collect a result. This currently gives a big performance gain.
;;Unfortunately it is impossible (or at least very hard) to do the same
;;thing when a collect is in progress. This will of course be fixed in
;;protocol B."
;; (cond
;; ((lyskom-kom-queue-collect-p kom-queue)
;; ;; Use oldstyle single big map. Sorry.
;; (initiate-get-map kom-queue handler conf-no
;; first-local no-of-texts data))
;; (t
;; ;; You win.
;; (lyskom-collect-ignore-err kom-queue)
;; (while (> no-of-texts 0)
;; (initiate-get-map kom-queue nil conf-no
;; first-local lyskom-fetch-map-nos data)
;; (setq first-local (+ lyskom-fetch-map-nos first-local))
;; (setq no-of-texts (- no-of-texts lyskom-fetch-map-nos)))
;; (lyskom-list-use kom-queue 'lyskom-receive-get-map handler data))))
(defun lyskom-receive-get-map (map-list handler data-list)
"Receive a list of maps.
......
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