Count of entries in SectionManager is never used (performance)
A bug in 2.1.1, submitted by nickdunn on 24 September 2010
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#408: Count of entries in SectionManager is never used (performance)
After some more testing it seems the performance gains are ever so slight on most builds. However they are notable when you have sections that have many thousands of entries.
Rolled this into this commit
Rock and roll, nice one.
This issue is closed.
I fell into a trance-like state during a recent query debugging session and discovered a query that can be safely removed that really improves performance.
http://github.com/symphonycms/symphony-2/blob/master/symphony/lib/toolkit/class.sectionmanager.php#L34
The
entry_count
that is created here is never used in the system at all. Search the source and weep.By means of example the generated query might look like this:
When my
entry_count
returned about 20,000 entries the query time was about 70ms. Not that slow, but consider this query running every time a new section is queried (at least once per new DS).I removed the count completely:
And query time snapped down to 0.5ms.
My page was on average 1.1s before, and 0.3s afterwards.