Re: [Sqlrelay-discussion] Sybase/Perl performance
Brought to you by:
mused
|
From: Carlos V. <cve...@em...> - 2010-02-05 14:48:51
|
Thank you very much. I will apply it and let you know how everything turns out.
CJ Vergara
From: Claudio Freire [mailto:kla...@gm...]
Sent: Friday, February 05, 2010 8:26 AM
To: Discussion of topics related to SQL Relay
Cc: Carlos Vergara
Subject: Re: [Sqlrelay-discussion] Sybase/Perl performance
Ok, it turned out that only a very small patch to rudiments is enough. I'll try to push it into rudiments, but in the meanwhile, just apply this patch to your rudiments installation:
diff -wur rudiments-0.32.orig/src/memorypool.C rudiments-0.32/src/memorypool.C
--- rudiments-0.32.orig/src/memorypool.C 2006-08-05 01:34:47.000000000 -0300
+++ rudiments-0.32/src/memorypool.C 2009-08-31 18:54:28.000000000 -0300
@@ -88,8 +88,11 @@
// if we didn't find a node with enough memory remaining,
// create a new one at the end of the list
if (!node) {
- memnode=new memorypoolnode((length>pvt->_increment)?
- length:pvt->_increment);
+ size_t incr = pvt->_increment;
+ size_t tot = pvt->_totalusedsize;
+ if (incr < (tot/10))
+ incr = (tot/10);
+ memnode=new memorypoolnode((length>incr)?length:incr);
pvt->_nodelist.append(memnode);
}
|