You want to know how DNS lookups for subdomains on your website can affect its performance. Use Google Chrome's about:dns feature to see DNS lookup times.
As a reminder, a subdomain is a DNS domain that is "part of a larger domain." Wikipedia provides the examples "mail.example.com" and "calendar.example.com" as possible subdomains. [Domain Name System - wikipedia.org]
Subdomains must be fetched from your DNS server separately from the main domain. In this way, they are an entirely different domain. This incurs a performance cost.
What I show here is Google Chrome's about:dns screen showing the Applicable Prefetch Time (ms) for several subdomains.
Subdomains require time to fetch them from the DNS server, which Google Chrome prefetches. However, this prefetching is mainly useful for people who have already visited the site. [DNS Prefetching (or Pre-Resolving) - Chromium Blog]
Almost all modern browsers request the file favicon.ico in the top level of every domain. This wastes lots of bandwidth for every visitor.
Subdomains just make it worse because the browsers will request favicon.ico for your subdomains separately.
Let's think of a visitor to dotnetperls.com. The visitor arrives from Google and reads an article. Next, she clicks on the link to my subdomain code.dotnetperls.com.
The subdomain incurs two more trips over the network for the visitor. The favicon.ico is requested again, and the DNS record is fetched.
This slows down the user experience of the pages, and costs me extra because of the extra favicon.ico request.
Web performance experts will tell you that minimizing HTTP requests from the browser is often the most important optimization for web pages.
Performance expert Andy King writes about this, stating "the more HTTP requests that your pages require, the slower... their response time will be." [Minimize HTTP Requests - websiteoptimization.com]
No. However, it helps solve the slowdown for many sites. It isn't perfect, and the favicon.ico must still be fetched.
Programs like Fasterfox also do prefetching, but the number of users running Fasterfox is small compared to people running regular browser setups.
We saw how you can avoid subdomains to minimize HTTP requests and reduce response times. This saves you money on bandwidth and makes your pages faster.
You can use Google Chrome and its about:dns screen to see DNS statistics for your computer's network. The screenshot I showed above revealed very small times for DNS lookups, but this can vary greatly.