You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
I discovered a huge performance issue with the DcaExtractor while doing some performance analysis for Isotope with xdebug. Contao calls $objDca = new \DcaExtractor(static::$strTable);every single time a model is created (see Model::__construct()). In my case I had 1300 model instances which results in 1300 instances of DcaExtractor. Each and everyone including the 'system/cache/sql/' . $strTable . '.php'; and thus accessing the file system 1300 times. In fact, it would be enough to do this one time per table.
I suggest introducing a DcaExtractor::getForTable($strTable) and using this one wherever possible:
Changed in 800ed2d. Unfortunately, I cannot protect the constructor to force people to use the getInstance() method, because it would break backwards compatibility.
I discovered a huge performance issue with the DcaExtractor while doing some performance analysis for Isotope with xdebug. Contao calls
$objDca = new \DcaExtractor(static::$strTable);
every single time a model is created (seeModel::__construct()
). In my case I had 1300 model instances which results in 1300 instances ofDcaExtractor
. Each and everyone including the'system/cache/sql/' . $strTable . '.php';
and thus accessing the file system 1300 times. In fact, it would be enough to do this one time per table.I suggest introducing a
DcaExtractor::getForTable($strTable)
and using this one wherever possible:I was able to speed up an Isotope product list generation by 6%.
The text was updated successfully, but these errors were encountered: