Avatar of JohnnyBCJ
JohnnyBCJ
Flag for Canada asked on

How can I lower my time to first byte?

One of my websites is extremely slow loading up (10 to 20 seconds on first load). I've discovered that my time to first byte is 2 to 3 seconds. I have access to everything on the website but I'm not able to modify much (page wise), as most of the site is a 3rd party script.

What can I do to speed up my website? What are the general troubleshooting steps for someone who had similar problems?
Web ServersASP.NETWeb Development

Avatar of undefined
Last Comment
JohnnyBCJ

8/22/2022 - Mon
madgino

Is your site precompiled, do you have a bin folder with dll files in the live site content?
Kamal Khaleefa

try to put the javascript files at the end of your page

also try to compress the images if u r using images

also this site may help you

http://www.webpagetest.org/
JohnnyBCJ

ASKER
Madgino; I'll check as soon as I get a chance this morning.

king2002; Surprisingly enough, I already tested out the page using that site and with a different site as well (http://analyze.websiteoptimization.com/wso).

webpagetest.org is how I learned about my Time to First Byte problem.
Your help has saved me hundreds of hours of internet surfing.
fblack61
JohnnyBCJ

ASKER
Madgino; There are no .dll files. There are a number of .asp, .xsl, .js, .gif and .css files
madgino

OK, if you have chrome installed, in developer tab (F12) use network, timeline and audit tabs and try to see if there is anything not normal in there (any big image, css, javascript etc)

But most probably the site is slow because the asp code is slow and you'll to try to optimize the code to get any significant improvement.

You have to dig into code, measure the time of different procedures/operations and see how you can improve them. It might be a slow database connection if you have one?
JohnnyBCJ

ASKER
madgino, thanks for the suggestions!

Google chrome confirms the time to first byte is bad.

So far I've done a number of things that http://www.webpagetest.org/ suggested and my speed has improved from about 40 seconds to around 3. My time for first byte is still horrid.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
madgino

As I told you, this is the time it takes to the server to process the page, it can mean that you have a complex page that does a lot of calculations/operations, that your sever is overloaded or that your page is using other resources that are slowly responding (like a database).

So check the serverl loading, check the database loading and if these are fine all you're left to do is to look to the source code and try to optimize it.
madgino

Also compare time to first byte on a simple page (something with text only) vs a normal page, is there a big difference?
JohnnyBCJ

ASKER
I'm going to give that a try right now. The basic page vs dynamic page speed difference.

I ended up getting it back to a somewhat expected time (3-4 seconds) but now it's back up to 30 seconds. Extremely annoying!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
madgino

Also run the pages from server and check the response time.
JohnnyBCJ

ASKER
The extremely small text based only page displays quickly. The dynamic page displays more slowly. If I disable the antivirus program on the web server, it takes about 10 seconds to load. If I enable the antivirus program on the web server, it goes back to its normal 30 seconds.
madgino

Maybe a server shortage? Memory, processor, slow hard-disk?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
JohnnyBCJ

ASKER
It's a dual core 3.4 ghz, 2 gigs of ram running windows XP pro. The only thing that is running on it is IIS and the 1 program that needs to be running in the background. It has a 40 gig hard drive and has 21+ gigs free.
madgino

This is hard to tell, put some monitoring on the server and hit it with requests, see what the peaks are.
It also depends on the pages, maybe are you doing a lot of reads/writes and you need a faster harddisk or to increase the pagefile.
JohnnyBCJ

ASKER
The page file is 4 gigs.

I just tested out the page and it connected without any problem. It takes about 3 seconds to load the page (which I'm OK with). The antivirus program is still running at this point.
My problem is that this could be a completely different story in another hour's time.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
madgino

Do you have setup any scheduled scans for the antivirus?
JohnnyBCJ

ASKER
The time between this post and my last post, the page goes from 3 seconds to 30+. I know it's not working from cache as I have access to the web server itself and I'm able to see when I hit the web server.

The scheduled scans are for 1 AM every morning.
ASKER CERTIFIED SOLUTION
madgino

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
JohnnyBCJ

ASKER
What performance counters would I be looking at specifically for system monitoring?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.