Upgraded from 7.2 to 9.0.2 and experienced pages are loading slow comparatively.
During performance testing used DynaTrace and observed that VisitorIdentification() is taking more than 60% of the time while a page is loading. Analyzing how the Robot Detection is configured.
Root Cause and Solution:
When we analyzed further using DynaTrace we figured out that function GetVPathBuildResult(System.Web.HttpContext, System.Web.VirtualPath, boolean, boolean, boolean, boolean) was throwing the exception below:
error CS0117: ‘Sitecore.Analytics.Tracker’ does not contain a definition for ‘Visitor’
This was alarming for us cause it was looking for Visitor rather Contact. Then we compared the files related to VisitorIdentification under .layoutsSystem and figured out that the upgrade process dint replace the latest files for 9.0.2. These were still 7.2 files which were looking for ‘Visitor’.
Replaced the files with latest version and time duration for calling that function dropped from 6+ seconds to 0.2 Seconds.
Also posted this question to Sitecore Stack Exchange. Please refer for more details.