如何解决网页传递速度慢的问题? [英] How do I fix slow web page delivery?

查看:78
本文介绍了如何解决网页传递速度慢的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道从哪里开始,所以我们将不胜感激.

我们有两个网站,它们的内容几乎完全相同.

一个是我们当前的实时站点,运行速度非常快,在请求页面和交付页面之间几乎没有明显的延迟.它在带有IIS 6的Windows Server 2003 R2 SP2 64位上运行.Net Framework 2.0.

另一个将在几个月后成为我们的实时站点,检索页面时会出现1秒钟到10秒钟的延迟.它在带有IIS 7的64位Windows Server 2008 SP2上运行.Net Framework 3.5.它是一个虚拟机,但与旧服务器具有相同的硬件":相同的内存,相同的驱动器存储,相同数量的处理器等

建立新站点的原因是,我们要添加一些页面,删除一些页面,重组文件夹层次结构以消除多年来积累的一些冗余和混乱,并通过重新设计CSS使站点焕然一新.总的来说,这两个站点在很大程度上是相同的,两个站点上的大多数页面都是相同的(除了样式不同).这使我们能够通过相同的网络连接使用相同的浏览器在同一台台式机上进行并排比较.

问题在于旧站点始终保持快速运行:单击链接,新内容的加载几乎没有察觉到的滞后.新站点始终运行缓慢:单击相同的链接,并且在等待相同内容传递时,同一台计算机上的同一浏览器将挂起.这似乎不是数据库问题,因为无论要测试的页面是静态文本还是要从复杂的查询中检索大量数据,新站点上的滞后都是存在的.出于价值考虑,两个站点都从同一数据库服务器上的同一数据库中提取数据.

我倾向于怀疑IIS的某种优化,但是旧网站是由不再在公司工作的人建立的.在这一点上,我什至不知道从哪里开始戳.任何人有任何建议吗?

I have no idea where to begin on this one, so any help will be appreciated.

We have two websites, with almost identical content.

One, our currently live site, is very fast with very little perceptible lag between requesting a page and its delivery. It is running the .Net Framework 2.0 on Windows Server 2003 R2 SP2 64-bit with IIS 6.

The other, which will become our live site in a few months, exhibits a lag of 1 second to as long as 10 seconds when retrieving a page. It is running the .Net Framework 3.5 on Windows Server 2008 SP2 64-bit with IIS 7. It is a virtual machine, but otherwise has the same "hardware" as the old server: same memory, same drive storage, same number of processors, etc.

The reason for the new site is that we are adding some pages, removing some pages, reorganizing the folder hierarchy to remove some redundancy and clutter that has accumilated over the years, and given the site a new facelift by redesigning the CSS. By and large, though, the two sites are largely the same, with most pages identical (other than having different stylings) on both sites. This has allowed us to do side-by-side comparisons on the same desktop machine using the same browsers over the same network connection.

The problem is that the old site is consistently fast: click on a link, and the new content is loaded with very little perceptible lag. The new site is consistently slow: click on the same link, and the same browser on the same computer hangs as it waits for the same content to be delivered. This does not appear to be a database issue, as the lag on the new site is there whether the page being tested is static text or retrieves a lot of data from a complex query. For what it is worth, both sites pull data from the same database on the same database server.

I am inclined to suspect some kind of optimization of IIS, but the old website was set up by someone who is no longer with the company. At this point, I don''t even know where to start poking. Anyone have any suggestions?

推荐答案

看看下面的这些文章.都是很棒的技术.

加快网页下载时间的十种方法 [通过示例加速您的网站 [ 10 ASP.NET性能和可伸缩性秘密 [可加快JavaScript,CSS和图像文件加载速度的软件包 [ ASP .Net网页优化清单 [提高Web应用程序性能的提示 [ Asp.net Web开发的28个提示 [ ^ ]

在开发任何网站时,应注意以下几点:头脑 [ ^ ]
Have a look at these following Articles. All are great techniques.

Ten ways to speed up the download time of your web pages[^]

Speed Up Your Website - By Example[^]

10 ASP.NET Performance and Scalability Secrets[^]

Package that speeds up loading of JavaScript, CSS and image files[^]

ASP .Net Web Page Optimization Checklist[^]

Tips to improve Performance of Web Application[^]

Also have a look at these tips.

28 Tips for Asp.net Web Development[^]

While developing any web site, one should keep some points in mind[^]


您好,

在开始进行任何修改之前,我建议您分析造成这些滞后的确切原因. 因此,我认为最好的开始方法是启用ASP.NET跟踪,在此位置上您将确切地看到将执行哪个步骤以及处理需要多长时间.

在这里,您将找到有关如何启用ASP.NET跟踪的说明:
http://msdn.microsoft.com/en-us/library/0x5wc973.aspx [ ^ ]

在这里,您将找到如何访问跟踪结果:
http://msdn.microsoft.com/en-us/library/wwh16c6c.aspx [ ^ ]

作为简短概述,您必须执行以下任务:

  • 在要跟踪的应用程序的web.config中添加以下跟踪元素:
Hello,

Before you start to modify anything, I would recommend to analyze what exactly creates those lags.
So in my opinion the best way to start would be to enable the ASP.NET Tracing where you see exactly which step will be executed and how long it takes to process.

Here you will find a description on how you enable the ASP.NET Tracing:
http://msdn.microsoft.com/en-us/library/0x5wc973.aspx[^]

and here you will find how you access the trace results:
http://msdn.microsoft.com/en-us/library/wwh16c6c.aspx[^]

As a short overview, you have to do the following tasks:

  • add the following trace element in the web.config of the application you want to trace:
<configuration>
  <system.web>
    <trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false"/>
  </system.web>
</configuration>


  • 在要执行跟踪的页面上发出一个请求(或多个请求)(只需浏览至该页面即可)
  • 打开网站http://< ; domain>/< rootweb(如果适用)>/trace.axd并查看已完成的请求.

  • 同一台服务器?
    图片以相同的方式调用吗?
    样式表是否相似?
    不同的ISP?

    各种各样的事情都可能导致这种情况,更多信息会有所帮助.
    Same server?
    Images called in the same way?
    Style sheets similar?
    Different ISP?

    all sorts of things could cause it, more information would help.


    这篇关于如何解决网页传递速度慢的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆