Typically, this is caused by the amount of time used by SPCertificateValidator.Validate() method, whose role is to check the validity of the certificate used to encrypt communications with the Security Token Service (STS). This certificate can be found in the Local Computer\SharePoint store in the Certificates console. Note that this certificate is generated by SharePoint Root Authority. Unfortunately, this Certification Authority (CA) is not a part of the Root Certificate Trust that is trusted natively by Windows (the Trusted Root Certificates). Since it is not part of the Trusted Root Certificates, Windows tries to retrieve a current list of root certificates to verify the validity of the certificate with updated information.
If SPCertificateValidator.Validate() takes a long time, you should be able to see it either in the ULS logs or by using Developer Dashboard. See the More information sectionfor error messages in ULS.