United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7131316 20ms latency always observed for LiveConnect round-trip in IE
7131316 : 20ms latency always observed for LiveConnect round-trip in IE

Details
Type:
Bug
Submit Date:
2012-01-19
Status:
Resolved
Updated Date:
2013-01-08
Project Name:
JDK
Resolved Date:
2012-01-26
Component:
deploy
OS:
windows
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
8

Related Reports
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
Customer complains about LiveConnect performance has significant regression for new-plugin vs old-plugin in 6. See the original bug report at

https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=13041545

IE is particularly slower than FF as reported, further investigation shows that there is a ~20ms constant latency during JS->Java->JS round-trip at the Java->JS segment.

                                    

Comments
SUGGESTED FIX

runMessagePump should actually handle messages as the name suggested.

To maximize backward compatibility, and to reduce the round trips between native->Java in case multiple invokeLater requests are involved, we queue up all invokeLater requests in Java code, and wake up the main thread to handle the one invokeLater request to handle the queued Runnables. Similar implementation is already in place for NPAPI plugin.
                                     
2012-01-19
EVALUATION

The problem is caused by a waiting timeout of 20ms in the Java_sun_plugin2_main_server_WindowsHelper_runMessagePump0() native method. The IE main thread is doing a LiveConnect call to Java and waiting for the result to return. During which operation, Java->JS calls are post to main thread to be processed via invokeLater.

As the main thread is blocked waiting for the result, the Java->JS call will only be processed after 20ms timeout.
                                     
2012-01-19



Hardware and Software, Engineered to Work Together