window.print() takes a very long time as of FF 78 on Macos Sierra
Categories
(Core :: Print Preview, defect)
Tracking
()
People
(Reporter: tom.bertrand, Assigned: bobowen)
References
(Regression)
Details
(Keywords: regression)
Attachments
(9 files, 1 obsolete file)
229.34 KB,
image/jpeg
|
Details | |
578.52 KB,
image/png
|
Details | |
215.40 KB,
image/png
|
Details | |
3.22 MB,
application/json
|
Details | |
68.07 KB,
image/jpeg
|
Details | |
10.35 KB,
text/plain
|
Details | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
3.23 KB,
patch
|
jcristau
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
3.32 KB,
patch
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Steps to reproduce:
Install the latest FF 78 on MacOS Sierra, attempt a window.print()
from the console, notice the time it takes for it to trigger the print prompt.
Actual results:
An excessive amount of time is being used before seeing the print prompt.
Expected results:
Same as FF 77 where the print prompt would instantly trigger.
Comment 1•4 years ago
|
||
Hi Tom,
I couldn't reproduce the issue you've mentioned on either Firefox 78.0.2 or Firefox 80.0a1 on MacOS 10.14 or 10.15 (I do not have access to 10.12)
Could you check if this issue also occurs while using a new profile? (you won't lose your old profile) Here is a link that can help you do that:
https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles#w_start-the-profile-manager-when-firefox-is-closed
Thanks!
Comment 2•4 years ago
|
||
Can confirm this issue on MacOS 10.12 Sierra.
It's worth noting that High Sierra nor Catalina can reproduce this issue.
- CMD+P works as expected and immediately prompts the print dialog.
- All examples on https://developer.mozilla.org/en-US/docs/Web/Guide/Printing either fail entirely or take quite a bit of time (30s+) before the print dialog appears.
Here are the results available on the firefox profiler
Comment 3•4 years ago
|
||
It might also be worth noting we have about 100 individual users of our application on 10.12 reporting this issue for Firefox 78.xx
Reporter | ||
Comment 4•4 years ago
|
||
Reporter | ||
Comment 5•4 years ago
|
||
Reporter | ||
Comment 6•4 years ago
|
||
Hey Peter, thanks for your reply.
The issue only happen on MacOS 10.12 Sierra since FF 78, (we've recommended to our users to downgrade to FF 77 for the time being and they were able to resume their printing operations). I tried creating a new profile as you suggested and the same performance issue was noticeable by simply calling window.print()
from the console.
Comment 7•4 years ago
|
||
I'll set a component in order to involve the development team in reviewing the issue.
Meanwhile, could you please check if it is the same on the latest Firefox Nightly? You can download it from here:
https://www.mozilla.org/en-US/firefox/channel/desktop/
Thank you!
Comment 8•4 years ago
|
||
Could you upload a profile, not only a picture of a profile?
Updated•4 years ago
|
Comment 9•4 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #8)
Could you upload a profile, not only a picture of a profile?
The screenshot Tom uploaded comes from the profile I linked. Uploaded for ease of access.
Comment 10•4 years ago
•
|
||
Aha, I missed the link in comment 2
But the profile is showing only one process, and that process is waiting for something.
Seeing also what is happening in other processes would be good.
Reporter | ||
Comment 11•4 years ago
|
||
Reporter | ||
Comment 12•4 years ago
|
||
Hey Olli, I've tried publishing the profile which has a bit more informations I hope, lmk if there is something else I can help with
Comment 13•4 years ago
|
||
Doesn't seem related to Layout, but feel free to send it back if it turns out it is.
Comment 14•4 years ago
|
||
Does window.print() take lots of time only if executed from the console?
Comment 15•4 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #14)
Does window.print() take lots of time only if executed from the console?
It also takes a significant amount of time if executed from some .js
scripts
Comment 16•4 years ago
|
||
jwatt: Anything you can think of that landed as part of print refactoring in 78 that might be related?
I'll move this to Print Preview for the time being to keep it out of Core::General.
Updated•4 years ago
|
Comment 17•4 years ago
|
||
According to this (https://bugzilla.mozilla.org/show_bug.cgi?id=1627626#c14), mozregression cannot be installed on Mac OS 10.12. Regression window finding procedure should be attempted while using Mac OS 10.13.
Comment 18•4 years ago
|
||
I have managed to run a special version of mozregression after all and I have come up with these results:
59:18.27 INFO: No more integration revisions, bisection finished.
59:18.27 INFO: Last good revision: 0f1e35bee5748fc5d8c5f2043d32c16ed261c99b
59:18.27 INFO: First bad revision: faf8e8097d2351b57063ad15b75d54c6ce32b24d
59:18.27 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0f1e35bee5748fc5d8c5f2043d32c16ed261c99b&tochange=faf8e8097d2351b57063ad15b75d54c6ce32b24d
Please NI me if retesting is necessary.
Updated•4 years ago
|
Comment 19•4 years ago
|
||
Tom, do you have a large number of printers configured or available (in System Preferences / Printers & Scanners), by any chance? Or network-connected printers that might be taking a long time to respond when the system queries them?
Erik, can you investigate this at all? I wonder if there are conditions that make the [NSPrinter printerNames];
query potentially very slow to return...? (Note that it's only on 10.12, though; according to comments above, more recent OS versions don't suffer from the issue.)
Reporter | ||
Comment 20•4 years ago
|
||
Hey Jonathan, I currently have no printer setup on my testing environment (Printers & Scanners is empty). If it can help your investigation we do have ~95 opened tickets (starting a day or 2 after FF 78 was released) with a subset of our customers that are all using MacOS Sierra. For the mean time we recommend them to downgrade to FF 77 which solves their issue.
Comment 21•4 years ago
|
||
I can confirm that I am unable to reproduce this behavior on my macOS 10.15.5 build.
Based on the attached profile, it looks like there is a poll to libsystem_kernel.dylib
that is taking up a lot of time.
I believe that jwatt may be working on something that may resolve this issue.
Comment 22•4 years ago
|
||
Should bug 117233 be backed out until this is fixed?
Comment 23•4 years ago
|
||
I don't know if that would be feasible.
This is pretty hot area of the code, especially within the last few weeks. Many changes are already built on top of that patch; and the class itself (along with its XPIDL interface) have been modified/renamed/provided new functionality since Bug 117233 landed.
But I would defer to jwatt's judgment for a final answer.
Updated•4 years ago
|
Comment 24•4 years ago
|
||
Comment 25•4 years ago
|
||
To cut a very long story short, this is caused by sandboxing causing the [NSPrinter printerNames] call to hang (which is actually bug 1324610 which we fixed years ago when Sierra was the latest OS X version) due to us invadvertantly calling that on the content process. I'm still figuring out the best way to fix the code.
Comment 27•4 years ago
|
||
Comment 28•4 years ago
|
||
Comment on attachment 9167151 [details]
Bug 1652764. Only allow nsPrinterList objects to be created in the main process. r=bobowen
Revision D85476 was moved to bug 1657854. Setting attachment 9167151 [details] to obsolete.
Assignee | ||
Comment 29•4 years ago
|
||
Assignee | ||
Comment 30•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 31•4 years ago
|
||
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dfbfb3f7c5b8 Only allow nsPrinterList objects to be created in the main process on macOS. r=jwatt
Assignee | ||
Comment 32•4 years ago
|
||
I'll get the patch up for Beta and ESR78, on Monday.
Should be the same patch for both, hopefully.
Comment 33•4 years ago
|
||
bugherder |
Assignee | ||
Comment 34•4 years ago
|
||
Assignee | ||
Comment 35•4 years ago
|
||
Assignee | ||
Comment 36•4 years ago
|
||
Comment on attachment 9169139 [details] [diff] [review]
- Beta * Bug 1652764: Only allow nsPrinterList objects to be created in the main process on macOS. r=jwatt
Beta/Release Uplift Approval Request
- User impact if declined: Users on older macOS versions will continue to experience long delays waiting for the print dialog.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Assuming QE have equipment with affected versions of macOS, see bug Description for STR.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Should be low risk, simple patch to block interface being created in content process, which is effectively what happened before the regressing patch landed.
- String changes made/needed: None
Assignee | ||
Updated•4 years ago
|
Comment 37•4 years ago
|
||
Comment on attachment 9169139 [details] [diff] [review]
- Beta * Bug 1652764: Only allow nsPrinterList objects to be created in the main process on macOS. r=jwatt
approved for 80.0b7
Comment 38•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Comment 39•4 years ago
|
||
Hello! I managed to reproduce the issue following the STR provided in the description using Fx 78.0.2 on macOS 10.12 (Sierra).
I can confirm that the issue is fixed on Fx 80.0b7 and on Fx nightly 81.0a1 (2020-08-11) using the same OS version.
Assignee | ||
Comment 40•4 years ago
|
||
(In reply to Negritas Sergiu from comment #39)
Hello! I managed to reproduce the issue following the STR provided in the description using Fx 78.0.2 on macOS 10.12 (Sierra).
I can confirm that the issue is fixed on Fx 80.0b7 and on Fx nightly 81.0a1 (2020-08-11) using the same OS version.
Thanks for verifying.
Assignee | ||
Comment 41•4 years ago
|
||
Comment on attachment 9169140 [details] [diff] [review]
- ESR78 * Bug 1652764: Only allow nsPrinterList objects to be created in the main process on macOS. r=jwatt
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Severe delay on printing dialog, making the feature very annoying or possibly apparently broken altogether.
- User impact if declined: Users on older macOS versions will continue to experience long delays waiting for the print dialog.
- Fix Landed on Version: 81
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Should be low risk, simple patch to block interface being created in content process, which is effectively what happened before the regressing patch landed.
Patch very similar to the one landed on Nightly and Beta, with just interface name changes. - String or UUID changes made by this patch: None
Comment 43•4 years ago
|
||
Comment on attachment 9169140 [details] [diff] [review]
- ESR78 * Bug 1652764: Only allow nsPrinterList objects to be created in the main process on macOS. r=jwatt
Approved for 78.2esr.
Comment 44•4 years ago
|
||
bugherder uplift |
Description
•