I have a problem, that scripts to take long.
My script includes one Page with Window, circa 30 Components (Label, ListBox, Edit) and a mySQL connection. A call takes circa 2.5 secounds.
I have this effect checked with save the starttime (microtime) and endtime (in VCLShutdown). In addition i have checked with xdebug2 and ApacheBench (200 requests, 5 concurrency).
With xdebug2, I noticed that in VCLShutdown over the function serializeChildren the function readNamePath more that 5100 times called and 1130 millisecounds he needs.
I have follow resolution (classes.inc.php):
Line 2128 insert: if ($this->_namepath != "") return $this->_namepath;
Line 2161 insert: $this->_namepath = $result;
I use the existing variable $_namepath (declares in line: 1183). The variable was apparently already been defined but not yet used.
This reduce the calls of readNamePath at 292 and the time at 18 millisecounds.
I could so that the time for different scripts to reduce 15-35%.
SVN: 256
I have now seen that the same change in Persistent class can perform. However, the effect here at a Ajax request a reduction from 14 at 0.8 milliseconds.
classes.inc.php:
Line 853 insert: protected $_namepath = "";
Line 856 insert: if ( $this->_namepath != "" ) return $this->_namepath;
Line 868 insert: $this->_namepath = $result;