Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15416/compiler/core
Modified Files:
Tag: Aug2009_NFI
fs.brg
Log Message:
optimizations for NFI XIRAF use case -- thanks a great bunch Jan R.!!
- ds_link (already in Stable) optimized for 1-node case
- indices now contain all data (but still not used automatically, nor based on
Lefteris' new indexing schemes)
most prominently though is: subexpression result caching
- caching hints in pragmas
- query enclosed in (# pf:session id:msec ) { query } or (# pf:session-use
id:msec ) { query }
+ queries in the same session use the same working set (documents opened only
once)
+ same working set allows to cache results
+ pf:session-use only uses cache, cannot add to it
- but, multiple pf:session-use can run concurrently; whereas pf:session is
exclusive
- inside a query, an arbitrary number of expressions can be marked up for
caching/reuse
+ (# pf:cache id ) { subexpr }
+ subexpr may not be enclosed by a for-loop
U fs.brg
Index: fs.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/core/fs.brg,v
retrieving revision 1.74
retrieving revision 1.74.8.1
diff -u -d -r1.74 -r1.74.8.1
--- fs.brg 7 May 2009 14:26:48 -0000 1.74
+++ fs.brg 28 Sep 2009 23:20:25 -0000 1.74.8.1
@@ -46,6 +46,7 @@
#include "abssyn.h"
#include "qname.h"
#include "mem.h"
+#include "string_utils.h" /* trimming for pragmas */
/* PFcnode_t */
#include "core.h"
@@ -3214,18 +3215,31 @@
/* ExtensionExpr: ext_expr (Pragmas, Expr) */
case 211:
+ /* We only understand caching pragmas */
+ if (C(L(p))) {
+ PFfun_t *cache = function (PFqname (PFns_pf, "query-cache"));
+ C(p) = APPLY (cache, C(L(p)), C(R(p)));
+ }
/* Just ignore the pragma. We don't understand it anyway. */
- C(p) = C(R(p));
+ else
+ C(p) = C(R(p));
break;
/* Pragmas: nil */
case 212:
/* We don't understand pragmas anyway */
+ C(p) = NULL;
break;
/* Pragmas: pragmas (pragma, Pragmas) */
case 213:
- /* We don't understand pragmas anyway */
+ if (PFqname_eq (L(p)->sem.pragma.qn.qname,
+ PFqname (PFns_lib, "cache")) == 0)
+ C(p) = str (PFstrUtils_trim_spaces (
+ PFstrdup (L(p)->sem.pragma.content)));
+ else
+ /* We don't understand pragmas anyway */
+ C(p) = C(R(p));
break;
/* DeclImport: RevalidationDecl */
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins