Weird Firefox performance issue

Adam Jackson ajax at redhat.com
Tue May 1 19:51:08 UTC 2012


On Tue, 2012-05-01 at 14:22 -0400, Tom Horsley wrote:
> On Tue, 1 May 2012 14:11:15 -0400
> Bill Nottingham wrote:
> 
> > In my experience, extremely slow FF performance is usually due to
> > writing out either the assorted sqlite data files in the profile
> > directory, or the big javascript pile that is the session storage.
> 
> I've got one really weird slowdown I finally figured out:
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=747350
> 
> If the primary X selection happens to be held by an application
> running remotely in an NX session, FF takes a long time to start
> and interacting with the sidebar bookmarks is really slow.
> 
> What I can't figure out is why the bookmarks care about
> the primary X selection. I can't imagine any reason for
> them to want to access the selection.

You can mostly blame nx for that, and then partly also blame X.
Assuming it is what I think it is.

Selections in X are a little unlike how you might naïvely think a
clipboard works.  Selections have ownership, but they do not have
content until you ask for it.  The PRIMARY selection is what's used when
you happen to select something with the mouse (usually just text, but,
depends on the application).  The CLIPBOARD selection is what's used
when you explicitly say Cut Copy or Paste.  So if the bookmarks toolbar
happens to assert PRIMARY ownership, and if the nxclient tries to keep
clipboards in sync between machines, then it's going to spend a ton of
time shoveling data back and forth.  And because X is not an especially
good bulk transport protocol, you occasionally have to use a server grab
to get the content transferred intact, which locks out all other clients
besides your ever-so-diligent nxclient trying to keep clipboards synced.

Lessons to learn from this:

- xulrunner maybe shouldn't assert PRIMARY ownership in this case
- network transparency is not free

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.fedoraproject.org/pipermail/test/attachments/20120501/8e80dee2/attachment.sig>


More information about the test mailing list