Hi,
A few days ago my team started complaining about long wait times when and rebuilding the application. When I investigated this, I noticed that first hit takes a lot of time. Now first hit usually takes a lot longer as caching is buing built, but not minutes. I also noticed that this was due to the fact that we reach a SQL server over VPN and Dynamicweb creates a lot of SQL Queries.
So my prayer would be to reduce the amount of SQL queries all around with first hit. If i took a page with some items on I was experiencing 229 sql queries, and many redundant, e.g.
"SELECT * FROM Information_Schema.Tables WHERE Table_Type = 'BASE TABLE'" was called 61 times
"SELECT [Page].[PageNavigation_UseEcomGroups], [Page].[PageNavigationParentType], [Page].[PageNavigationGroupSelector], [Page].[PageNavigationShopSelector], [Page].[PageNavigationMaxLevels], [Page].[PageNavigationProductPage], [Page].[PageNavigationIncludeProducts], [Page].[PageNavigationProvider] FROM [Page] WHERE ( [Page].[PageId] = @p0 )" was called 42 times, etc.
I know that the last example might be called using different @p0, but you may consider a strategy that simply pulls everything out it needs in one go instead of picking them up one by one (Like prepare on prices).
My Dw version is 9.3.2, I don't know if any of this is resolved in 9.3.4, but I did not see bug fix notes regarding this issue it in the release notes up till the newest.
Have a nice weekend :)
/Søren