Closed Bug 1659807 Opened 4 years ago Closed 4 years ago

Consider adding an nsIPrinter.systemName

Categories

(Core :: Printing: Setup, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jwatt, Assigned: alaskanemily)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [print2020_v82][old-ui-])

Attachments

(1 file)

nsPrinterListCUPS::NamedPrinter (added in bug 1658300) requires getting CUPS to iterate over all the printers which kinda defeats the purpose of nsIPrinterList::getNamedOrDefaultPrinter. Longer term we should consider exposing the CUPS "system" name for the frontend code to save to prefs for a given printer, and pass that to nsIPrinterList::getNamedOrDefaultPrinter.

Putting this on the v82 list purely to consider this as part of trying to figure out what we can do about our bad perf issues.

Flags: needinfo?(emcdonough)
Keywords: perf
Priority: P3 → P2
Whiteboard: [print2020] → [print2020_v82]
Whiteboard: [print2020_v82] → [print2020_v82][old-ui-]

I agree with this, it would make things simpler on OS X in particular if the frontend used the CUPS/Unix name for the printer, and then just used the display name/readable name for the UI.

I have my doubts it would too drastically affect performance, but we are definitely doing extra work we don't need to given how it's working right now.

The downside is that all current saved printers are using a readable name still. I suppose we could start by assuming the name is a Unix/CUPS name, and then fall back to checking readable names if that fails. That would hopefully make the common case simpler, and wouldn't add too much extra work to the worst case.

Flags: needinfo?(emcdonough)
Assignee: nobody → emcdonough
Status: NEW → ASSIGNED

This is cheaper to lookup on platforms that use CUPS and do not show the Unix
name for printers. This only applies to OS X at the present.

Attachment #9175738 - Attachment description: Bug 1659807 - Add nsIPrinter.systemName and nsIPrinterList.getNamedSystemPrinter → Bug 1659807 - Add nsIPrinter.systemName and nsIPrinterList.getPrinterBySystemName
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5531b9de687e Add nsIPrinter.systemName and nsIPrinterList.getPrinterBySystemName r=emilio
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: