JSP加载时间超过12秒 [英] JSP load taking more than 12 seconds

查看:95
本文介绍了JSP加载时间超过12秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有JSP,加载时间超过12秒。它在IE11上工作正常。它包括其他6个jsps。我试图分析什么导致父jsp的加载时间更长。

I have JSP which takes more than 12 seconds to load. It works fine on IE11. It includes 6 other jsps within. I am trying to analyze what is causing longer load time for parent jsp.

每次加载父JSP时都会编译包含的JSP吗?

Does included JSPs are compiled every time parent JSP is being loaded?

每个JSP和父JSP都有一些在script标签中定义的函数。

这些函数是否在服务器上编译?
如果编译后浏览器每次加载时都会渲染这个JS函数吗?

Each JSP and parent JSP has some functions defined in script tag.
Are these functions compiled on server? And if compiled does browser render this JS functions everytime on load?

改进步骤:
在JS脚本中包含所有JS函数并将其导入页。因此,浏览器可以从浏览器缓存中提取它,而不是一次又一次地渲染它。它会有帮助吗?

Improvement steps: Include all JS functions in JS script and import it on page. So that browser can pick it up from browser cache rather than rendering it again and again. Will it help?

下面是探查器报告的快照。

Heres the snapshot of profiler report.

推荐答案

您可以使用像Yourkit这样的任何java分析工具,看看大部分时间花在哪里

You may profile using any of the java profiler tools like Yourkit and see where most of the time is spent

这篇关于JSP加载时间超过12秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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