Optimized list generation with nconc vs. append
[umlisp.git] / sql-classes.lisp
index 8031ace4553584dfdf6f2e3411881cdae0f41bd8..64cc4b3499b46834a622a4c4b1588cf621651b18 100644 (file)
@@ -911,8 +911,8 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
                                 only-exact-if-match limit &key extra-lookup-args)
   (let ((uobjs '()))
     (dolist (word (delimited-string-to-list str #\space))
-      (setq uobjs (append uobjs
-                          (kmrcl:flatten (apply obj-lookup-fun word :srl srl extra-lookup-args)))))
+      (setq uobjs (nconc uobjs
+                         (kmrcl:flatten (apply obj-lookup-fun word :srl srl extra-lookup-args)))))
     (let ((sorted
            (funcall sort-fun str
                     (delete-duplicates uobjs :test #'= :key key))))