I am building an application in C# that connects to a SharePoint website to backup data. The first time it connects it takes 100,000 milliseconds to get a response from the SharePoint site. While waiting the CPU usage is 0 and the Ram usage is stable. It still takes 100,000 milliseconds even when the username and password provided are incorrect.
Connection script:
ClientContext client = new ClientContext(SITE_URL);
context.Credentials = new SharePointOnlineCredentials(username, password);
context.ExecuteQuery();
The first call of ExecuteQuery takes 100 milliseconds regardless of what I ask it to load, but it is only the first request that has this delay.