Closed rhertogh closed 3 years ago
I noticed that our tests were not running correctly (only Scrutinizer). I tried to fix that, but without luck so far... will take a look at it later.
@schmunk42 any idea when this is going to be merged? Generating all models for my current project takes ages to complete and this improvement does make a major impact (from 60+ seconds to +- 3 seconds to generate all models). What seems to be the problem with the scrutinizer?
Scrutinizer is working, the problem is here https://travis-ci.com/github/schmunk42/yii2-giiant
@eluhr could you try to fix the Travis tests
Thank you!
When generating models for many tables (and relations) the generation can take quite some time. The majority of the time is spent on the
generateRelations
function. Since this function returns the same data for each table this data can be cached.In this case the models were generated more than 50x faster with caching enabled.
As far as I can see it is fully backwards compatible. But I've added the
modelCacheRelationsData
option to disable the cache just in case.