New issue
Advanced search Search tips

Issue 879284 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Printing: do not communicate with print server on every preview refresh

Project Member Reported by rbpotter@chromium.org, Aug 30

Issue description

Spinning off from https://crbug.com/819313.

Every time the Print Preview is refreshed, PrintRenderFrameHelper calls UpdatePrintSettings, which ultimately calls down to PrintJobWorker::SetSettings. This triggers a call to gtk_enumerate_printers and other gtk functions on Linux. On other platforms, there are similar calls for communicating with print drivers that occur. When the server is slow as in bug 819313, this results in long delays for every preview refresh.

Currently it looks like the only reason to communicate with the driver is to obtain the correct margins in the case that the user has requested printer minimum margins. We should either:
(1) Only call the driver if minimum margins have been requested, and their value has not already been retrieved for a previous request
(2) Find a way to return the minimum margins with the printer capabilities (e.g. in the media sizes), and never call PrintJobWorker for preview refreshes - i.e. send the rendering parameters directly from PrintPreviewHandler.
 

Sign in to add a comment