Loading Form is very slow (thousands of hits to DB)

,

Hi all

We have a few forms in our application that have a number of pages which also have a number of sections within. The initial load of the first page of the form is very slow (once inside the form it seems fine).

I did a SQL Profiler trace and my database isn’t getting hit at all on the form load but when I trace the Umbraco database whilst opening one of my forms I have 4500 logs in my profiler and even up to as many as 25000 logs in profiler for some of the more complicated forms.

Not each of these rows is a call to the DB (maybe like every 3rd or 4th row). The vast majority of the rows (with executes) make up these two queries.

exec sp_executesql N’SET LOCK_TIMEOUT 60000;SELECT value FROM umbracoLock WITH (REPEATABLEREAD)  WHERE id=@0’,N’@0 int’,@0=-335
exec sp_executesql N’SELECT [umbracoTwoFactorLogin].[id] AS [Id], [umbracoTwoFactorLogin].[userOrMemberKey] AS [UserOrMemberKey], [umbracoTwoFactorLogin].[providerName] AS [ProviderName], [umbracoTwoFactorLogin].[secret] AS [Secret]FROM [umbracoTwoFactorLogin]WHERE (([umbracoTwoFactorLogin].[userOrMemberKey] = @0))‘,N’@0 uniqueidentifier’,@0=‘68839F45-1643-4D83-A980-E5CD43AAEF62’

We don’t have any 2FA enabled so not sure why it’s calling so many times to check this.