Hi.
I'm fairly new to tbs stuff but on the entry level, the simplest example I tried proved being tricky.
require_once('TinyButStrong/tbs_class.php');
require_once('TinyButStrong/plugins/tbs_plugin_opentbs.php'); // Load the OpenTBS plugin
// generate some random data
$row = array();
for ($i=0;$i<100;$i++) { $row["a$i"] = "a"; }
//die('[data.'.implode("]\t[data.",array_keys($row)).']');
$report = array();
for ($i=0;$i<1000;$i++) { $report[] = $row; }
$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN); // load the OpenTBS plugin
$TBS->LoadTemplate('template.xlsx');
$suff = '-'.date('Y-m-d');
$TBS->MergeBlock('data', $report);
$TBS->Show(OPENTBS_FILE, 'report'.$suff.'.xlsx');
|
template.xlsx holds simple:
[data.a0;block=row][data.a1][data.a2][data.a3]...[data.a99] |
(if you uncomment line below data generation in above code it'll print it for you - except for ";block=row" part)
...and the processing time of data rises by x squared (and some) with dataset length.
Ffor 100 rows it takes 1,2s, for 500 rows - 10s and for 1000 rows it takes whopping 33s.
That is for opentbs plugin version 1.9.2.
However... When I used earlier version (1.7.4 in my case) the times are 0.016, 0.061 and 0.107 respectively.
Hence my suspicion of a bug in latest version of this plugin...
Or perhaps I'm doing it wrong, and I'd be grateful for a hint what is it.