Changeset 13531


Ignore:
Timestamp:
08/22/11 14:48:39 (10 years ago)
Author:
Mark Evenson
Message:

Optimize the compilation of files with a large number of compilands.

Don't use DIRECTORY with a wildcard unless when compiling files unless
we know of the presence of at least one class constant ".clc" via
PROBE-FILE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compile-file.lisp

    r13514 r13531  
    589589        (when truename
    590590          (push truename pathnames)
    591           (dolist (resource (directory
    592                              (make-pathname :name (format nil "~A_*"
    593                                                            (pathname-name truename))
    594                                             :type "clc"
    595                                             :defaults truename)))
    596             (push resource pathnames)))))
     591          ;;; XXX it would be better to just use the recorded number
     592          ;;; of class constants, but probing for the first at least
     593          ;;; makes this subjectively bearable.
     594          (when (probe-file (make-pathname :name (format nil "~A_1" (pathname-name truename))
     595                                           :type "clc"
     596                                           :defaults truename))
     597            (dolist (resource (directory
     598                               (make-pathname :name (format nil "~A_*"
     599                                                            (pathname-name truename))
     600                                              :type "clc"
     601                                              :defaults truename)))
     602              (push resource pathnames))))))
    597603    (setf pathnames (nreverse (remove nil pathnames)))
    598604    (let ((load-file (merge-pathnames (make-pathname :type "_")
Note: See TracChangeset for help on using the changeset viewer.