Closed Bug 184755 Opened 23 years ago Closed 16 years ago

Scrolling pages with java applets is very slow

Categories

(Core Graveyard :: Plug-ins, defect, P2)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: sfraser_bugs, Unassigned)

References

()

Details

Scrolling pages with java applets is very slow. The reason is that on each scroll, the applet redraws itself several times: SetWindow() calls in ScrollPositionDidChange, which were added for RealPlayer synchronous Invalidate() calls in ScrollPositionDidChange (not sure why this was added) and maybe a Paint().
Notes to self: nsPluginInstanceOwner::Paint calls SetWindow() to get RealPlayer to draw in the right place. Calling this also fixes a weird scrolling issue with the PDF plugin. nsPluginInstanceOwner::ScrollPositionDidChange also calls SetWindow to get RealPlayer to draw correctly. nsPluginInstanceOwner::ScrollPositionDidChange calls Invalidate(PR_TRUE) on the widget for some reason (scrolling with QuickTime?) The MRJ plugin code forces several redraws of the applet on scroll events: MRJPluginInstance::HandleEvent calls MRJPluginInstance::inspectInstance on every event, which calls MRJContext::inspectWindow, which does a synchronizeClipping() if the scroll position changed, which in turn does a synchronizeVisibility(). MRJContext::setWindow() calls synchronizeClipping() MRJContext::scrollingEnds() calls synchronizeClipping() So we end up with 5 or 6 redraws of the applet per scroll event.
Status: NEW → ASSIGNED
Blocks: 224615
I can't find any of this code that is Camino-specific. where is it?
I don't think any of that is Camino-specific.
No longer blocks: 224615
Blocks: 224615
Priority: -- → P2
Target Milestone: --- → Camino1.0
Ping. If this isn't Camino specific, can we resolve this bug as INVALID?
This bug probably is part of what Steven Michaud calls the "Mozilla family spurious updates problem" (which he's worked around to some extent in JEP)...see also bug 293813 comment 11. My guess is this belongs in Core: Plugins, not INVALID.
-> Core
Product: Camino → Core
Target Milestone: Camino1.0 → ---
Version: unspecified → Trunk
> My guess is this belongs in Core: Plugins, not INVALID. > -> Core I agree. Scroll this page in Safari with Java 1.3.1 (temporarily drag JavaPluginCocoa.bundle out of /Library/Internet Plug-Ins/). Then try it in Firefox or Camino using Java 1.3.1 via the MRJ Plugin JEP (drag JavaEmbeddingPlugin.bundle temporarily out of /Library/Internet Plug-Ins but leave MRJPlugin.plugin in place). There's a _big_ difference (Firefox and Camino scroll much more slowly). The performance is less bad if you also drag out MRJPlugin.plugin (so that Firefox and Camino so Java 1.3.1 via Apple's Java Applet.plugin), but still not as good as Safari. The difference between scrolling in Java 1.3.1 via Java Applet.plugin (a Netscape-4-style plugin) and via the MRJ Plugin JEP (an XPCOM plugin) seems to be that, in the latter case, two additional kinds of event are sent (ScrollingBeginsEvent and ScrollingEndsEvent) ... _far_ too often (sometimes several pairs per second). You can see this for yourselves (in the Java Console) if you add "-Djep.debug.updates=true" (without the quotes) to the Java Console's Java Runtime Parameters box. For this you need to be running Java 1.4.X (or 1.5) -- the logging capability is in JavaEmbeddingPlugin.bundle. But Firefox and Camino can't tell which Java version they're using, so they behave the same way regardless.
Something I forgot go mention: This bug's URL scrolls quickly when using Java 1.4.X or Java 1.5 -- despite all the excess ScrollingBegins and ScrollingEnds events coming in to the MRJ Plugin JEP (and its resulting excess calls to MRJContext::synchronizeClipping()). The reason is that JavaEmbeddingPlugin.bundle suspends screen updates from the JVM to an applet's display area around every change in that applet's location or clipping.
More detail: > The reason is that JavaEmbeddingPlugin.bundle suspends screen > updates from the JVM to an applet's display area around every change > in that applet's location or clipping. The JavaEmbeddingPlugin.bundle also (via the MRJ Plugin JEP) increases the (per applet) "suspend updates count" with every ScrollingBeginsEvent (for all applets in a given page) and decreases it with every ScrollingEndsEvent. JVM screen updates are off (for a given applet) while the count is above zero.
Assignee: sfraser_bugs → nobody
QA Contact: chrispetersen → plugins
smichaud, is this still seen with current versions of java on Mac? If so, there's probably a better component for this now?
Status: ASSIGNED → NEW
> smichaud, is this still seen with current versions of java on Mac? No, not as far as I can see. I think we can just close this WORKSFORME, as per comment #8 and comment #9.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.