Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23697
Modified Files:
gdk_search.mx
Log Message:
Many opertions result in a views which are an exact copy of the original.
When we need hash tables for these views we create these now on the parent,
this will improve hash table reuse.
Index: gdk_search.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_search.mx,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- gdk_search.mx 1 Feb 2008 12:21:37 -0000 1.76
+++ gdk_search.mx 6 Mar 2008 12:15:24 -0000 1.77
@@ -335,6 +335,18 @@
BAT *
BAThash(BAT *b, size_t masksize)
{
+ BAT *o = NULL;
+
+ if (isVIEW(b)) {
+ bat p = VIEWhparent(b);
+ o = b;
+ b = BATdescriptor(p);
+ if (!ALIGNsynced(o,b)) {
+ BBPunfix(b->batCacheid);
+ b = o;
+ o = NULL;
+ }
+ }
gdk_set_lock(GDKhashLock(ABS(b->batCacheid) & BBP_BATMASK), "BAThash");
if (b->H->hash == NULL) {
unsigned int tpe = ATOMstorage(b->htype);
@@ -346,6 +358,7 @@
str nme = BBP_physical(b->batCacheid);
BATiter bi = bat_iterator(b);
+ ALGODEBUG THRprintf(GDKout, "#BAThash: create hash(%d);\n",
BATcount(b));
/* cnt = 0, hopefully there is a proper capacity from which
* we can derive enough information */
if (!cnt)
@@ -475,9 +488,16 @@
}
break;
}
+ if (hp->storage & STORE_MMAP)
+ MT_mmap_pin(hp->base, hp->maxsize);
b->H->hash = h;
}
gdk_unset_lock(GDKhashLock(ABS(b->batCacheid) & BBP_BATMASK),
"BAThash");
+ if (o != NULL) {
+ o->H->hash = b->H->hash;
+ BBPunfix(b->batCacheid);
+ b = o;
+ }
return b;
}
-------------------------------------------------------------------------
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-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins