U4-2353 - Duplicate sql will be executed on CMS Pages

Created by Stefan Tolpeit 11 Jun 2013, 06:35:22 Updated by Claus Jensen 17 Jan 2017, 09:06:32

Relates to: U4-1970

Depends on: U4-1970

With the MiniProfiler i found out that Umbraco makes 2 roundtrips to the database with the same query. The CmsTemplate will be queried twice.

See also http://our.umbraco.org/forum/ourumb-dev-forum/bugs/40984-Umbraco-61-beta2-MiniProfiler-Duplicate-SQL

1 Attachments

Comments

Stefan Tolpeit 20 Jun 2013, 06:30:11

I just found out when de Query will executed twice. If you have a nested template in your Umbraco at example: The Home Template has a _Layout as parent.


Mikael Syska 20 Jun 2013, 06:51:59

I guess that's the whole point of having nested templates. :-)

But I hope they will fix this soon. Not that my site is slow, just waste of time spending 10% of the time i the SQL database for every request, when it's not really needed.


Meixger 20 Jun 2013, 10:19:27

it's not exactly a duplicate reader, but i see 2 sql roundtrips with TemplateId and MasterTemplateId.

See method PerformGet(int id) in TemplateRepository, where the Master template will be loaded.

Edit: seems to be related to http://issues.umbraco.org/issue/U4-684

Edit: seems TemplateRepository does not cache - see use of NullCacheProvider

Edit: How do high-traffic sites deal with those database roundtrips on every request?


Meixger 20 Jun 2013, 10:20:15

How do high-traffic sites deal with those database roundtrips on every request?


Stefan Tolpeit 23 Jul 2013, 07:39:34

by U4-1970


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Difficult

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.1

Due in version: 6.1.3

Sprint:

Story Points:

Cycle: