[developers] start-generator-server

Francis Bond fcbond at gmail.com
Thu Dec 13 07:03:22 CET 2007


would anyone object to me adding code that would make
start-generator-server run index-for-generator iff necessary?

I can't imagine any negative repercussions, but just in case ...

Francis Bond <http://www2.nict.go.jp/x/x161/en/member/bond/>
NICT Computational Linguistics Group

P.S. the change would be (in translate.lisp):

(defun start-generator-server (&optional (forkp t) (gcp t))
;;; New bit here
  (unless (and (hash-table-p mrs::*relation-index*)
	   (> (hash-table-count mrs::*relation-index*) 0))
;;; finishes here
  (when (and *generator-server* forkp)
    (with-open-file (log (merge-pathnames
			   (current-user) (first *translate-grid*)))
                     :direction :output :if-exists :supersede)))
  ;; tune Allegro CL gc() performance to initially tenure everything (assuming
  ;; that is the grammar, mostly) and then keep everything in newspace.
  (when gcp
    (excl:gc :tenure)
    (excl:gc t)
    (setf (sys:gsgc-parameter :auto-step) nil))

  (if forkp
    (with-output-to-top ()
      (setf *generator-server*
        (mp:run-function "generator server" #'start-generator-server nil gcp)))
    (translate :serverp t)))

More information about the developers mailing list