I just tried this on 2.1.3 and it is working much, much better. There was still a significant lag initially, then I discovered that my tplChunk had a malformed placeholder in it that was probably choking the parse engine - [[+$placeholder]]. (To Bruno17’s point, I think). Took out the stray ’$’ and now the initial (uncached) load is about 5-6 seconds, with subsequent loads basically immediate.
@Bob, this is using native PHP Oracle calls, since there is not an xpdo-for-Oracle solution to date.
For those interested, my code looks like this:
$sql = "SELECT (really long arduous Oracle SQL statement)";
$stid = oci_parse($conn, $sql);
oci_execute($stid);
$vars = array();
$nrows = oci_fetch_all($stid, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
foreach ($res as $row) {
$vars['grp_descr'] = $row['SFS_ACCOUNT_GROUP_DESCRIPTION'];
$vars['status'] = $row['ACCOUNT_STATUS'];
$vars['acct'] = $row['SFS_ACCOUNT'];
$vars['acctalign'] = (ctype_alpha(substr($vars['acct'],0,1))) ? 'left' : 'center';
$vars['type'] = $row['SFS_ACCOUNT_TYPE'];
$vars['title'] = $row['SFS_ACCOUNT_TITLE'];
$vars['color'] = $row['SFS_ACCOUNT_COLOR'];
$vars['definition'] = $row['SFS_ACCOUNT_DEFINITION'];
$modx->toPlaceholders($vars);
$resultRows .= $modx->getChunk('tplResultsRow');
}
$modx->setPlaceholder('result_rows', $resultRows );
The chunk looks like this:
<tr class="[[+color]]">
<td align="left">[[+grp_descr]]</td>
<td align="center">[[+status]]</td>
<td align="[[+acctalign]]">[[+acct]]</td>
<td align="center">[[+type]]</td>
<td align="left">[[+title]]</td>
<td align="left">[[+definition]]</td>
</tr>
Returns 935 rows and now loads in about 5 or so seconds. There are some Oracle php.ini settings I might try to fiddle with to improve on that.