/
Slow theme scan, when Changes Log is enabled [5.2.2-B1]

Slow theme scan, when Changes Log is enabled [5.2.2-B1]

During theme scanning a category is created for each of templates. When Changes Log is enabled, then each such category creation also results in extra time/sqls to log.

The category creation isn't most effective SQL-wise (takes ~5 sqls to create a category) plus some SQLs from Changes log and therefore during mass category creation during theme rescan it ends up for 5099 total for Advanced theme.

Solution

Override "CategoriesItem::ShouldLogChanges" method to prevent change logging when Special is:

  • rebuild-path
  • rebuild

This would decrease SQL count to 2534.

Related Tasks