简体   繁体   English

java 8u31插件导致签名的applet加载速度慢得多

[英]java 8u31 plugin causes signed applets to load much slower

i have noticed that signed applets are loaded much slower with the latest plugin (included in java 8u31 and 7u75). 我注意到使用最新的插件(包含在java 8u31和7u75中)加载签名的applet要慢得多。 I have debugged the situation quite a lot and i found out that the problem is directly related to the size of the jar files that are referenced in the jnlp file. 我已经调试了很多情况,我发现问题与jnlp文件中引用的jar文件的大小直接相关。 The problem is that each time the applet starts, there is some 're-indexing' of the cached jar files that takes time. 问题是,每次applet启动时,都会对缓存的jar文件进行一些“重新索引”,这需要花费时间。

To reproduce the issue i did this: I created a minimal applet and in the jnlp file i used to deploy it, I added several irrelevant .jar files (that are not even referenced, so the classloader does not load them) of considerable size (eg 30MB). 为了重现这个问题我做了这个:我创建了一个最小的applet,在我用来部署它的jnlp文件中,我添加了几个相关大小的无关的.jar文件(甚至没有被引用,因此类加载器不加载它们)例如30MB)。 Of course i am using versioning in the jnlp and capture all http traffic to make sure that the delays are not because of traffic (either re-downloading or certificate revocation checks, etc). 当然我在jnlp中使用版本控制并捕获所有http流量以确保延迟不是因为流量(重新下载或证书撤销检查等)。 I run the applet with the trace enabled and then went through the xml trace log file and found out where the delays come: they are always from the JarSigningVerifier .... 我在启用了跟踪的情况下运行applet,然后浏览了xml跟踪日志文件,找出了延迟的来源:它们总是来自JarSigningVerifier ....

Has anyone else seen something like that? 有没有人见过这样的东西?

It is very easy to see and reproduce this behavior and i wonder if there is something i am overlooking. 很容易看到并重现这种行为,我想知道是否有我忽视的东西。 Having worked on applets for the past years extensively, i am totally lost at what can be happening. 在过去几年中广泛使用applet,我完全迷失了可能发生的事情。 I can verify that reverting to the previous version of the plugin (and every other version before) works as expected. 我可以验证恢复到以前版本的插件(以及之前的所有其他版本)是否按预期工作。

I have submitted a bug report with oracle, but i haven't heard back still. 我已经提交了oracle的错误报告,但我还没有收到回复。 Any info or idea will help, TIA 任何信息或想法都会有所帮助,TIA

Same here. 同样在这里。 I thought already I'm getting crazy. 我以为我已经疯了。 Thanks for sharing this. 谢谢你分享这个。

We are using Java Web Start, but it's sharing the same problem of re-indexing all jar files (in our case it's an app with quite some jars, so starting takes ages). 我们正在使用Java Web Start,但是它共享了重新索引所有jar文件的相同问题(在我们的例子中,它是一个带有相当一些jar的应用程序,所以开始需要很长时间)。

Aside from the fact that Oracle suddenly decided to check the certificate of the deploy TLS, which caused some hickup on Linux and Macs (we used a StartSSL certificate there, which isn't included in the Java keystore - on Windows it works as it uses the platforms root certs, too). 除了Oracle突然决定检查部署TLS的证书这一事实之外,它在Linux和Mac上引起了一些困难(我们在那里使用了一个StartSSL证书,它没有包含在Java密钥库中 - 在Windows上它可以正常工作平台根证书也是如此)。

And, to make it even worse, on Windows x86 the 8u31 silently dies if -XX:+DoEscapeAnalysis or -XX:+OptimizeStringConcat is present in the JVM arguments, though both parameters are standard in Java 8 (but not in 7, that's why they've been included, still). 而且,更糟糕的是,在Windows x86上,如果-XX:+ DoEscapeAnalysis或-XX:+ OptimizeStringConcat存在于JVM参数中,8u31会无声地死亡,尽管这两个参数在Java 8中都是标准的(但不是7,这就是为什么他们已经被包括在内了。 The 64bit engine doesn't have that problem. 64位引擎没有这个问题。

The next thing they changed is they now overwrite the start icons if they've been changed (we changed them to put the 64bit engine's path in there), so it stubbornly changes the path back to the 32bit engine every time. 接下来他们改​​变的是他们现在覆盖了开始图标,如果它们已被更改(我们改变它们以将64位引擎的路径放在那里),所以它每次都固执地将路径改回32位引擎。

The behaviour of Oracle is not helpful at all, as they didn't announce any of these changes in their changelogs, let alone announcing the certs changes a few days ahead. Oracle的行为根本没有帮助,因为他们没有在更改日志中宣布任何这些更改,更不用说在未来几天宣布证书更改。

I would like to hear from anyone who's sharing the problems and possible workarounds. 我想听听任何分享问题和可能的解决方法的人的意见。

Patric 帕特里克

Have you been able to solve this issue? 你能解决这个问题吗? Have you had a reaction from Oracle? 你有甲骨文的反应吗?

UPDATE START 更新开始

END UPDATE 结束更新

We are using Java Web Start for an Eclipse RCP-based application with jars that are all signed. 我们将Java Web Start用于基于Eclipse RCP的应用程序,其中包含全部签名的jar。 Startup time is 8s within the IDE, Java version doesn't seem to matter here. IDE中的启动时间是8s,Java版本似乎并不重要。 With web start the story is different. 随着网络的开始,故事是不同的。 It becomes (much) worse with every Java update: 每次Java更新都会变得更糟糕:

  • 7u?? 7U? (<60): +2s (10s) (<60):+ 2s(10s)
  • 7u60: +5s (13s) 7u60:+ 5s(13s)
  • 7u75: +15s (23s) 7u75:+ 15s(23s)
  • 8u31: +12s (20s) 8u31:+ 12s(20s)
  • 8u40: +21s (29s) 8u40:+ 21s(29s)
  • 8u51: +23s (31s) 8u51:+ 23s(31s)

Have you tried your jnlp without versioning? 你没有版本化试过你的jnlp吗? In my experience Java jnlp is very buggy specially if you change the jnlp default values. 根据我的经验,如果更改jnlp默认值,Java jnlp特别容易出错。 Versioning support is disabled by support, so try it without versioning and see if it still slow? 支持禁用版本控制支持,因此在没有版本控制的情况下尝试它,看看它是否仍然很慢?

For me, I noticed some bugs when I used update="background" value, so I no longer change the default update method. 对我来说,当我使用update =“background”值时,我注意到了一些错误,所以我不再更改默认的更新方法。 My theory is that Oracle only tests jnlp against default values before they release new Java versions. 我的理论是Oracle在发布新的Java版本之前只测试jnlp与默认值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM