Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12275
Modified Files:
Tag: xquery-decomposition
rt_projection.mx xrpc_client.mx xrpc_server.mx
Log Message:
major changes in xrpc_server.mx: try to reduce the time needed to parse
a request message, by using join (and other BAT primitives) where
possible. Largely reduced the number of times we search through
ATTR_OWN: instead of twice per value, we loop only once through
ATTR_OWN, but each xs:attribute value stil requires an additional
BATselect on ATTR_OWN.
Index: xrpc_client.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_client.mx,v
retrieving revision 1.41.2.12
retrieving revision 1.41.2.13
diff -u -d -r1.41.2.12 -r1.41.2.13
--- xrpc_client.mx 11 Mar 2008 03:59:42 -0000 1.41.2.12
+++ xrpc_client.mx 12 Mar 2008 02:28:41 -0000 1.41.2.13
@@ -551,7 +551,7 @@
#ifndef XRPC_CLIENT_H
#define XRPC_CLIENT_H
-#define MAX_BUF_SIZE (1024*1024)
+#define MAX_BUF_SIZE (1024*1024*200)
#define NR_RETRIES 3
#endif /* XRPC_CLIENT_H */
@@ -1075,11 +1075,12 @@
BAT *pre_nid = NULL, *attr_own = NULL, *attr_qn = NULL;
BAT *qn_prefix = NULL, *qn_uri = NULL, *qn_loc = NULL;
oid *pre_nid_lst = NULL, *attr_own_lst = NULL, *attr_qn_lst = NULL;
- BATiter strValsi, qn_prefixi, qn_urii, qn_loci, upathi, rpathi;
- BUN upath_base, rpath_base;
+ BATiter strValsi, qn_prefixi, qn_urii, qn_loci;
+ /* BATiter upathi, rpathi; */
+ /* BUN upath_base, rpath_base; */
lng time_xrpcClntSeria = 0, time_xrpcClnt2Serv = 0;
- size_t bytes_sent = 0;
+ size_t bytes_prj = 0, bytes_sent = 0;
errCheck(iterc, argc, ws, used_item, used_kind,
returned_item, returned_kind, upath_item, rpath_item,
@@ -1155,6 +1156,8 @@
updCall?"true":"false");
assert((b->pos > 0) && (b->pos < b->len));
+
+ bytes_prj = b->pos;
if(!(pm = serialize_fragments(options, b, bs, ws,
used_item, used_kind, returned_item, returned_kind,
int_values, dbl_values, dec_values, str_values))) {
@@ -1162,7 +1165,13 @@
clean_up(sock, out, bs, b, argcnt, iterc, pm);
return GDK_FAIL;
}
+ if(options && strstr(options, "timing")){
+ stream_printf(GDKout,
+ "XRPC_Fragments_Size: " SZFMT "
bytes\n\n",
+ (b->pos - bytes_prj));
+ }
+#if 0 /* Temporarily turn it off, as it is not handled */
/* Serialize used/returned paths */
i = BATcount(upath_item);
a = BATcount(rpath_item);
@@ -1188,6 +1197,7 @@
}
str2buf(b, "</xrpc:projection-paths>");
}
+#endif
for (my_iter = 0; my_iter < iterc; my_iter++) {
if (argc == 0) {
@@ -1393,7 +1403,7 @@
b->pos += snprintf((b->buf + b->pos), (b->len
- b->pos),
"<xrpc:document xrpc:fragsid=\"%lld\""
" xrpc:nodeid=\""OIDFMT"\"/>",
- i+1, item);
+ i+1, item+1);
break;
case 5: /* COLLECTION */
GDKerror("CMDhttp_post:
call%d/sequence%d/item%d has "
@@ -1446,8 +1456,6 @@
lng time_remoteExec = GDKusec();
shredBAT = response2bat(sock, dst, port, b, *updCall);
- clean_up(-1, out, bs, b, argcnt, iterc, pm);
- if(!shredBAT) return GDK_FAIL;
time_remoteExec = GDKusec() - time_remoteExec;
if (options && strstr(options, "timing")) {
@@ -1462,6 +1470,9 @@
(time_remoteExec/1000.0));
}
+ clean_up(-1, out, bs, b, argcnt, iterc, pm);
+ if(!shredBAT) return GDK_FAIL;
+
*res = shredBAT;
return GDK_SUCCEED;
}
Index: xrpc_server.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v
retrieving revision 1.58.2.9
retrieving revision 1.58.2.10
diff -u -d -r1.58.2.9 -r1.58.2.10
--- xrpc_server.mx 11 Mar 2008 03:59:42 -0000 1.58.2.9
+++ xrpc_server.mx 12 Mar 2008 02:28:41 -0000 1.58.2.10
@@ -147,14 +147,7 @@
#define OUT_OF_MEM "Internal Receiver Error: out-of memory"
#define NOT_WELL_FORMED "Request XML message not well-formed"
-#define MAX_NR_PARAMS 1024
-
-#define REQ_MODULE 0
-#define REQ_LOCATION 1
-#define REQ_METHOD 2
-#define REQ_ARITY 3
-#define REQ_ITER_COUNT 4
-#define NR_REQ_ATTRS 5
[...1185 lines suppressed...]
return GDK_FAIL;
@@ -1475,8 +1238,7 @@
if (ret == GDK_FAIL) {
BBPreclaim(shredBAT);
shredBAT = NULL;
- send_err(mc->c->fdout, TRUE, ERR404, "env:Sender",
- NOT_WELL_FORMED);
+ send_err(mc->c->fdout, TRUE, ERR404, "env:Sender",
NOT_WELL_FORMED);
GDKfree(argcnt[0]);
GDKfree(argcnt);
return ret;
@@ -1498,7 +1260,7 @@
argcnt, argtpe, argval, NULL);
}
- if (timing && ret != GDK_FAIL) {
+ if (timing) {
fprintf(stdout,
"XRPC_Server_DeSerialisation: %10.2f msec\n",
(time_xrpcServDeSeria/1000.0));
Index: rt_projection.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/Attic/rt_projection.mx,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -u -d -r1.1.2.15 -r1.1.2.16
--- rt_projection.mx 11 Mar 2008 03:59:41 -0000 1.1.2.15
+++ rt_projection.mx 12 Mar 2008 02:28:41 -0000 1.1.2.16
@@ -1102,9 +1102,9 @@
do { if (*s == '/') *s = DIR_SEP; } while(*(++s));
}
if (*file == DIR_SEP) {
- GDKerror("xquery_print_result_file: %s cannot have an absolute
name.\n", file);
+ GDKerror("runtime_doc_projection: %s cannot have an absolute name.\n",
file);
} else if (len < 4 || (strcmp(file+len-4, ".xml") && strcmp(file+len-4,
".XML"))) {
- GDKerror("xquery_print_result_file: %s name does not end in .xml\n",
file);
+ GDKerror("runtime_doc_projection: %s name does not end in .xml\n",
file);
} else if (GDKcreatedir(file)) {
if((fp = fopen(file, "wb"))) {
if((out = file_wastream(fp, file))){
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins