Permalink
Browse files

Fix problem with progress reporting

When number of objects in a store was a multiple of 10000, the "<n>
objects created" message was printed whenever a "<n> of <m> objects
initialized" was printed.  Reported by R. Stoye.
  • Loading branch information...
1 parent 2409b38 commit 5f43cac9520cde4086c94b2d675d8a8b73473d85 @hanshuebner committed Sep 11, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/data/object.lisp
@@ -653,6 +653,7 @@ the slots are read from the snapshot and ignored."
:direction :input)
(let ((class-layouts (make-hash-table))
(created-objects 0)
+ (reported-objects-count 0)
(read-slots 0)
(error t)
(*slot-name-map* nil))
@@ -662,9 +663,11 @@ the slots are read from the snapshot and ignored."
(finalize-object-subsystem "Finalize the object subsystem.")
(loop
(when (and (plusp created-objects)
- (zerop (mod created-objects 10000)))
+ (zerop (mod created-objects 10000))
+ (not (= created-objects reported-objects-count)))
#+nil (format t "Snapshot position ~A~%" (file-position s))
(report-progress "~A objects created.~%" created-objects)
+ (setf reported-objects-count created-objects)
(force-output))
(when (and (plusp read-slots)
(zerop (mod read-slots 10000)))

0 comments on commit 5f43cac

Please sign in to comment.