Skip to content

Large PDF takes several minutes and GB to render #15359

@Jap2-0

Description

@Jap2-0

I don't know how focused you are on performance, particularly in such extreme cases, at the moment, but I thought I'd file this in case it might be of help at some point.

Attach (recommended) or Link to PDF file here:
https://www.dot.state.mn.us/d7/projects/14newulmtonmankato/pdfs/projectlayoutmarch2021.pdf

Configuration:

  • Web browser and its version: Firefox Nightly 106
  • Operating system and its version: Windows 10 21H1
  • PDF.js version: 2.16.71
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Open linked PDF (~35MB)
  2. Wait

Acrobat loads this in about 20 seconds, whereas pdf.js takes about 4.5 minutes. Interestingly, Acrobat does not keep the whole page renders but instead re-renders as you scroll, while pdf.js renders the entire page (eventually) and keeps it saved. Acrobat uses about 650MB of memory, while pdf.js uses about 3GB (evenutally falling to about 700MB after some amount of time - perhaps switching to another tab? - but also several hundred MB in the GPU process (although that number is far less consistent for me).

I can try to get a profile if that's helpful; a full profile is too large for Firefox to process, but if partial ones are useful I can work on that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions