Closed Bug 1061277 Opened 9 years ago Closed 7 years ago

"Snap Links Plus" add-on does not work with e10s

Categories

(Firefox :: Extension Compatibility, defect)

34 Branch
x86_64
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s + ---

People

(Reporter: wsmwk, Unassigned)

References

Details

(Keywords: addon-compat)

+++ This bug was initially created as a clone of Bug #1047797 +++

https://addons.mozilla.org/en-US/firefox/addon/SnapLinksPlus/ not working with e10s. Attempted to drag a rectangle around some links, not drag outline appears.

I've had e10s running now for about 1 hour.
Wayne, do you see any interesting error messages in the Firefox Browser Console when you are trying to draw the rectangle?
tracking-e10s: --- → +
Didn't see anything.
hi Clint, are you the maintainer of the Snap Links Plus add-on?

It does not seem to be compatible with multi-process Firefox (e10s). If you have any questions about e10s support, just drop by the #e10s IRC channel on irc.mozilla.org. MDN also has a good introduction:

https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox
The developer has been contacted on AMO.
My apologies, other things in life have kept me from working on this add-on.  When is e10 going to land in release?  May also have some temporal dead zone issues to work through.
So I was looking into this more, unfortunate I didn't know this was going to be coming down the road about a year ago.  About 6 months ago I re-worked SnapLinks to be mostly based in chrome.

So I get what needs to be done, the question is, where would it be better to have the bulk of the code?  In a script frame (loaded into each document) or most in the chrome side?  Seems like loading most of it into each document (on demand) would be desirable but could potentially eat up the most memory.

Probably 99-100% of the code could be only in the document, very little access to XUL is needed.  If that were the case would it be preferable to implement most (or all) in a document script frame?  From what I've read it will be one process for all documents and one for the chrome, but that further down it will be one process per document, right?
I think that keeping more code in the chrome process will generally be better for performance, provided it doesn't increase messaging between chrome and content significantly. This is all very dependent on what your add-on does and how much you can move to the chrome, of course.
Clint, I don't think chrome/content messaging should be a performance concern for Snap Links Plus running in the chrome process. Some add-ons, like Adblock Plus, scan all page content on every page load, but AFAIU Snap Links Plus would only need to read web content to find links when the user is drawing the rectangle.

If you have any more specific technical questions, please drop by the #e10s IRC channel on irc.mozilla.org or ask Ally CC'd on this bug.
One difficulty is that highlighted elements are highlighted with 'outline' and so keeping most of the code in chrome I would think would have some of these (potential?) drawbacks:

Chrome               Frame
Drag Started   ->    Give me all rects (also view information? scrollBar size, location, etc)
onMouseMove
  Calc Selected ->   remove outline on previous elements, add outline to new selections


To be honest there is precious little I *have* to do on the chrome side, my big concern would be one of these scenarios:
 - Loading just a stub (to capture first right-click-drag) followed by loading the rest of the code (memory-light)
  - Concern is UI responsiveness of Document/SnapLinks while 'the rest of the code' is loaded/activated

 - Loading most everything into each browser window (best performance?)
  - Concern is possibly memory...  Does the code get shared b/w processes (not data) or would it inflate memory on each doc process?
Any update on this yet?
Flags: needinfo?(bugzilla)
I have not yet found the time to even consider this project.  I have a lot going on these days and may not be able to update it to work with e10s.  I use dev edition myself and have stopped using Snap Links (because its not compatible) though I do wish I had it...

If you know of anyone who has some time to hop on board with helping to maintain/rewrite/update it, please send them my way.
Flags: needinfo?(bugzilla)
Component: General → Extension Compatibility
(In reply to Clint Priest from comment #11)
> I have not yet found the time to even consider this project.  I have a lot
> going on these days and may not be able to update it to work with e10s.  I
> use dev edition myself and have stopped using Snap Links (because its not
> compatible) though I do wish I had it...
> 
> If you know of anyone who has some time to hop on board with helping to
> maintain/rewrite/update it, please send them my way.

Have you been able to find time to work on it? e10s enters A/B testing in Beta on Monday. If you're still looking for someone to help with it, I can suggest https://discourse.mozilla-community.org/c/add-ons as a place to look.
Flags: needinfo?(bugzilla)
Just thought I'd mention that I'm working on a re-write as a WebExtension.
Flags: needinfo?(bugzilla)
v3b1 is ready to go, I'll be submitting to AMO today or tomorrow.  It's a tracer bullet version, so the core functionality is there, but no configuration or options.  Basic functionality of right-click-drag select A[href] elements, letting go opens them in new tabs is working.

I doubt v3 will be the same, feature for feature as v2 is.  I have some ideas/plans for it that will hopefully be better than the original for 90% of use cases.
By the way, it was dead-simple to write this as a web extension.  I think supporting the web extension model was a great way to go.
3.0.0.2 is listed as available at https://addons.mozilla.org/en-US/firefox/addon/snaplinksplus/ so I'll have to give it a spin.

https://github.com/cpriest/SnapLinksPlus/issues/73
Flags: needinfo?(vseerror)
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #16)
> 3.0.0.2 is listed as available at
> https://addons.mozilla.org/en-US/firefox/addon/snaplinksplus/ so I'll have
> to give it a spin.
> 
> https://github.com/cpriest/SnapLinksPlus/issues/73

seems to work fine now
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(vseerror)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.