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)
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().
Reporter | ||
Comment 1•23 years ago
|
||
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
Comment 2•22 years ago
|
||
I can't find any of this code that is Camino-specific. where is it?
Reporter | ||
Comment 3•22 years ago
|
||
I don't think any of that is Camino-specific.
Reporter | ||
Updated•20 years ago
|
Priority: -- → P2
Target Milestone: --- → Camino1.0
![]() |
||
Comment 4•20 years ago
|
||
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.
Reporter | ||
Comment 6•20 years ago
|
||
-> Core
Product: Camino → Core
Target Milestone: Camino1.0 → ---
Version: unspecified → Trunk
Comment 7•20 years ago
|
||
> 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.
Comment 8•20 years ago
|
||
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.
Comment 9•20 years ago
|
||
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.
Reporter | ||
Updated•17 years ago
|
Assignee: sfraser_bugs → nobody
Updated•16 years ago
|
QA Contact: chrispetersen → plugins
Comment 10•16 years ago
|
||
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
Comment 11•16 years ago
|
||
> 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
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•