 (defun ovirt-log-analyzer-filter-by-function (filter-function)
   (save-excursion
     (goto-char (point-min))
-    (while (< (point) (point-max))
+    (ovirt-log-analyzer-while 50 (< (point) (point-max))
       (let ((beg (point))
             (end (if (funcall filter-function) (line-beginning-position) (point-max))))
         (unless (= beg end)

      (when (> max-file-field-length 0)
        (goto-char (point-min))
        (let (point)
          (while (and (not (eobp))
                      (setq point (next-single-char-property-change (point) 'ovirt-log-analyzer-file-field-length)))
            (goto-char point)
            (let ((length (get-char-property (point) 'ovirt-log-analyzer-file-field-length)))
              (when (and length (< length max-file-field-length))


(defvar ovirt-log-analyzer-vms '())
(make-variable-buffer-local 'ovirt-log-analyzer-vms)

(defmacro ovirt-log-analyzer-while (interval condition &rest body)
  (let ((counter (make-symbol "counter")))
    `(let ((,counter 0))
       (while ,condition
         ,@body
         (cl-incf ,counter)
         (when (= (mod ,counter ,interval) 0)
           (accept-process-output)
           (sit-for 0))))))

(defun ovirt-log-analyzer-show-log ()
  (interactive)
