Changeset 3467

Show
Ignore:
Timestamp:
07/16/08 15:51:58 (4 months ago)
Author:
ksprotte
Message:

compute timestamp with less consing in country-stats-handler

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/web/kml-handlers.lisp

    r3466 r3467  
    130130 
    131131(defmethod handle ((handler country-stats-handler)) 
    132   (let* ((paid-contracts (remove-if-not #'contract-paidp (class-instances 'contract))) 
    133          (timestamp (reduce #'max paid-contracts :key (lambda (contract) (store-object-last-change contract 0))))) 
     132  (let* ((contracts (class-instances 'contract)) 
     133         (timestamp (reduce #'max contracts :key (lambda (contract) 
     134                                                   (if (contract-paidp contract) 
     135                                                       (store-object-last-change contract 0) 
     136                                                       0))))) 
    134137    (hunchentoot:handle-if-modified-since timestamp)   
    135138    (setf (hunchentoot:header-out :last-modified) 
     
    153156                ;; (with-element "href" (text "http://maps.google.com/mapfiles/kml/pal3/icon23.png")) 
    154157                (with-element "href" (text (format nil "http://~a/static/Orang_weiss.png" (website-host)))))))           
    155           (dolist (country-contracts (sort (group-on paid-contracts 
     158          (dolist (country-contracts (sort (group-on (remove-if-not #'contract-paidp contracts) 
    156159                                                     :test #'equal 
    157160                                                     :key (lambda (contract)