什么是找到一个Web应用程序的瓶颈的途径? [英] What are the ways to find bottlenecks in a web application?

查看:156
本文介绍了什么是找到一个Web应用程序的瓶颈的途径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何基准我的web应用程序的性能?

How do I benchmark the performance of my web applications?

有没有办法找出在Web应用程序中的瓶颈?

Is there a way to find out the bottlenecks in a web application?

编辑:我不是问任何前端调整像图片,CSS等。我想知道的是如何分析的应用程序的后端,这样我就知道了修改,以提高性能哪些方法/查询

I am not asking about any front end tweaks like images, css etc. What I want to know is how to profile the back end of the application so that I will know which methods/queries to modify to increase the performance.

推荐答案

关于在应用服务器上的瓶颈,您可以使用分析工具看到多少时间在你code,多少内存使用,等等。对于每一个PHP大部分时间都花在,的 webgrind 似乎是分析的流行,基于GUI的方式。像 dotTrace 会做同样的事,一个ASP.NET应用程序。需要注意的是,当涉及到数据库中,这样的分析工具将只显示你的数据库的查询很慢 - 不是的为什么的他们是缓慢的。对于这一点,你需要寻找到特定数据库的分析...

Regarding bottlenecks on the application server, you can use a profiling tool to see how much time is spent in each part of your code, how much memory is used, etc. For PHP, webgrind seems to be a popular, GUI-based way of profiling. Something like dotTrace would do the same thing for an ASP.NET app. Note that when it comes to databases, profiling tools like this will only show you which database queries are slow--not why they are slow. For that, you'd need to look into database-specific profiling...

Web应用程序的瓶颈的另一个方面是,它实际上多少时间浏览器downlad一切(CSS和JavaScript的进口,图像等)和渲染页面。还有像一些公司主题谁拥有机器人会打你的网站从世界各地,分析性能,并给你的建议您可以更改,让您的应用程序的到浏览器的输出,并以最快的速度呈现尽可能的(例如,使用gzip的COM pression,并把你的JavaScript页​​面的末尾,而不是头,等等)。你也可以做一个规模要小得多这yourslelf,当然。例如,Firefox插件如捷飞络并的 YSlow的将做的工作。

Another aspect of web app bottlenecks is how much time it actually takes a browser to downlad everything (CSS and JavaScript imports, images, etc.) and render the page. There are several companies like Keynote who have bots that will hit your site from all around the world, analyze the performance, and give you recommendations about changes you can make to get the output of your app to the browser and rendered as quickly as possible (e.g., "use gzip compression and put your JavaScript at the end of the page instead of the head", etc.). You can also do this yourslelf on a much smaller scale, of course. For example, Firefox plug-ins like Jiffy and YSlow will do the job.

这篇关于什么是找到一个Web应用程序的瓶颈的途径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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