[elephant-cvs] CVS update: elephant/TUTORIAL
blee at common-lisp.net
blee at common-lisp.net
Thu Sep 2 14:39:12 UTC 2004
Update of /project/elephant/cvsroot/elephant
In directory common-lisp.net:/tmp/cvs-serv30393
Modified Files:
TUTORIAL
Log Message:
comments on initforms and transactions
Date: Thu Sep 2 16:39:12 2004
Author: blee
Index: elephant/TUTORIAL
diff -u elephant/TUTORIAL:1.4 elephant/TUTORIAL:1.5
--- elephant/TUTORIAL:1.4 Sun Aug 29 22:35:37 2004
+++ elephant/TUTORIAL Thu Sep 2 16:39:12 2004
@@ -250,6 +250,11 @@
you're concerned, cache values. (In the future we will
provide automatic value caching.)
+Finally, if you for some reason make an instance with a
+specified OID which already exists in the database, initargs
+take precedence over values in the database, which take
+precedences over initforms.
+
------------
Transactions
------------
@@ -388,3 +393,21 @@
The serializer is definitely fast on fixnums, strings, and
persistent things. It is fairly fast but consing with
floats and doubles. YMMV with other values.
+
+Using *auto-commit* and not "with-transactions" is a great
+way to have a huge number of transactions. You'll find that
+
+(dotimes (i 1000) (add-to-root "key" "value"))
+
+is way slower than
+
+(let ((*auto-commit* nil))
+ (with-transaction ()
+ (dotimes (i 1000) (add-to-root "key" "value"))))
+
+since there's only 1 transaction in the latter.
+
+Use the persistent classes and collections; if you're using
+transactions correctly they should be much faster.
+
+If you don't need transactions you can turn them off.
More information about the Elephant-cvs
mailing list