降低小程序加载时间 [英] Reducing the applet loading time

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

问题描述

我也有包含在它作为一个applet jar文件的HTML文件。当我始终打开HTML文件,它得到太多的时间来加载的小程序。

I have an html file which has a jar file included in it as an applet. When ever i am opening the html file its getting too much time to load the applet.

有什么办法通过,我可以减少这种加载时间??

Is there any way by which i can reduce this loading time??

推荐答案

有是在这里打球的三个主要因素。

There's at three major factors in play here.

1) Java的启动时间。曾经是5-10秒冷启动,但是这已经与在 Java的快速启动 这是在Java 1.6更新10。这是在默认情况下为Windoes XP和2000的一部分(Vista提供它自己的pre-装载机制),但也许你有这样的禁止(使信息)。

1) Java startup time. Cold start used to be 5-10 seconds, however this has changed with the Java quickstarter which was part of the Java 1.6 update 10. This is on by default for Windoes XP and 2000 (Vista offers its own pre-loading mechanisms), but maybe you have this disabled (enable information).

2)下载时间为您的小程序。本地测试它,如果启动时间是显著不同考虑使用更好的融为一体pression技术。 Proguard的 会混淆code和<减少code尺寸A HREF =htt​​p://proguard.sourceforge.net/results.html相对=nofollow>高达90%。 90KB不应该是缓慢的,但是这可能取决于你的网络速度和主机。

2) The download time for your applet. Test it locally and if the startup time is significantly different consider using better compression techniques. Proguard will obfuscate code and reduce the code size by upto 90 percent. 90Kb shouldn't be slow, but this could depend on your network speed and host.

3)的code你使用初始化小程序。你可以临时更改的init 方法只显示一个Hello World按钮来确定,如果这是一个问题。如果你不开心的表现,你可能需要配置您的code。

3) The code you're using to initialize the applet. You could temporarily change your init method to just show a hello world button to identify if that is a problem. If you're not happy with the performance you may need to profile your code.

Applet的启动时间应该在第二(不包括下载时间)。检查你有一个相当新的Java和尝试一个简单的的Hello World小程序

Applet startup time should be around a second (excluding download time). Check you have a fairly recent Java and try a simple Hello World applet.

这篇关于降低小程序加载时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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