Closed Bug 1258946 Opened 10 years ago Closed 8 years ago

Grammarly Firefox add-on is really, really slow in GMail composer

Categories

(WebExtensions :: General, defect)

defect
Not set
normal

Tracking

(platform-rel -)

RESOLVED WONTFIX
Tracking Status
platform-rel --- -

People

(Reporter: timdream, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [platform-rel-Google] [platform-rel-Gmail])

Grammarly ( https://grammarly.com/ ) comes with an add-on that injects itself into the text boxes. Unfortunately, it is really really slow on Firefox compare to Chrome. It almost made Firefox unusable. I don't have a contact to the site, but as an exercise to understanding Firefox performance, I would like to find out what we have available to find out what slow down the add-on, and maybe improve Gecko accordingly (or, actually contacts w/ their engineering to workaround the issues).
BTW I am on Aurora w/ e10s turned on. So things readily available did not make it better.
While it is also slow on Bugzilla <textarea>, for example, the contenteditable in GMail composer is the slowest.
Summary: Grammarly Firefox add-on is really, really slow → Grammarly Firefox add-on is really, really slow in GMail composer
Whiteboard: [platform-rel-Google] [platform-rel-Gmail]
platform-rel: --- → ?
platform-rel: ? → +
Rank: 7
Any possibility for someone to further investigate here :naveed? We've also got a direct communication line for some of the Gmail folks if that's useful.
Flags: needinfo?(nihsanullah)
platform-rel: + → -
Ehsan, this is the bug we were talking about.
Flags: needinfo?(ehsan)
Depends on: 1354643
Here is a profile that I captured myself: https://perfht.ml/2paZwYT I'm not really sure what to do with this bug... :( I think bug 613498 plays a big role here, but I don't know what's the best way to evaluate the pure XRay overhead in cases like this. Bill, Boris, I'd appreciate if you can also have a look at the profile and see if you can spot anything I couldn't?
Depends on: 613498
Flags: needinfo?(wmccloskey)
Flags: needinfo?(ehsan)
Flags: needinfo?(bzbarsky)
Filtering that profile on "Xray" shows pretty much no time spent under those.... I'll try and see whether I can reproduce this, I guess.
You have to scroll down to the fourth tab process. Time spent in xrays there is... quite a lot. I did think of one thing here. In bug 1334263, Kris mentioned that WebExtensions would prefer if expandos were shared between sandboxes from the same add-on (so, same principals). That would actually save us a little work since we could remove the exclusive global check and, importantly, the cost of wrapping the exclusive global. We might only be able to do this for WebExtensions though. Not sure.
> You have to scroll down to the fourth tab process Ah, I see. Yes, there's definitely some Xray time there. It's hard to figure out how it breaks down because of all the garbage JS stackframes. I wish we could get a fix for <https://github.com/devtools-html/perf.html/issues/238>; it would make profiling a lot more effective. I _think_ the slowness is mostly due to expando handling in Xrays, but it's really hard to tell for sure. One experiment worth checking is changing our code to always hand out transparent CCWs instead of Xrays and seeing how performance is affected...
Flags: needinfo?(bzbarsky)
(In reply to Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-) from comment #9) > > You have to scroll down to the fourth tab process > > Ah, I see. Yes, there's definitely some Xray time there. It's hard to > figure out how it breaks down because of all the garbage JS stackframes. I > wish we could get a fix for > <https://github.com/devtools-html/perf.html/issues/238>; it would make > profiling a lot more effective. > > I _think_ the slowness is mostly due to expando handling in Xrays, but it's > really hard to tell for sure. > > One experiment worth checking is changing our code to always hand out > transparent CCWs instead of Xrays and seeing how performance is affected... We decided instead of doing this waiting for the issue mentioned above to be fixed and retry looking at the profile...
Flags: needinfo?(wmccloskey)
Flags: needinfo?(nihsanullah)
Mass-closing bugs that relate to legacy versions of add-ons or are otherwise no longer worth tracking. Please comment if you think this bug should be reopened. Sorry for the bugspam. Made you look, though!
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
You need to log in before you can comment on or make changes to this bug.