Closed Bug 2064727 Opened 3 months ago Closed 1 month ago

Share pulls network bytes, not PDF bytes which cause slow speeds and issues when the PDF has been edited

Categories

(GeckoView :: PDF Viewer, defect)

All
Android
defect

Tracking

(firefox159 fixed)

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: olivia, Assigned: olivia)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group6])

Attachments

(1 external file)

STR:

Observe:
Share sheet can sometimes take a while to populate.

I suspect we can optimize this by ferrying the bytes directly from the PDF instead of from the network again, which appears to be the current case.

The changes in bug 2064162 might be interesting here too.

Upgrading the status of this one to bug, because it also prevents users from getting the edit.

Type: task → defect
Summary: [Optimization] Sharing a PDF can take a while under poor network conditions → Share pulls network bytes, not PDF bytes which cause slow speeds and issues when the PDF has been edited
Assignee: nobody → ohall

The severity field is not set for this bug.
:olivia, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(ohall)
Severity: N/A → S3
Flags: needinfo?(ohall)
  • The current architecture does a network request to get the PDF bytes on a displayed PDF
    on a remote resource or a media request to get the PDF bytes on a local resource.
  • The new PDF viewer toolbar update makes adding annotations to the PDF a possibility.
  • The old methods do not grab the new bytes, so we should ask the PDF directly for the information.

This patch:

  • Adds requestPdfToShare to get the bytes as a resource from the PDF.
  • Adds a new DirectResource as a ShareResourceState to accomodate situations where we already have the bytes.
  • Adjusts PdfShareActionExt to create a DirectResource and use the prior method as a fallback, in case it were ever to fail.
Blocks: 2071966
Blocks: 2075336
Blocks: 2075337
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: