C1FlexViewer, PDF files and memory usage

Posted by: rhum1a on 30 March 2021, 5:28 pm EST

  • Posted 30 March 2021, 5:28 pm EST

    Hi,

    I’m using C1FlexViewer (4.0.20203.457) into simple Form .net and I notice a high memory consumption when a PDF file is loaded and browsed.

    Here is my use case with a PDF file (3Mo and 32 pages).

    Before loading file CPU is at 230Mo

    When it’s loaded, CPU is at 250Mo.

    Scrolling to page 5 → 260Mo

    Scrolling to page 10 → 280Mo

    Scrolling to page 15 → 300Mo

    Scrolling to page 20 → 300Mo

    Scrolling to page 32 → 305Mo

    So just for reading this PDF file, CPU grow from 230Mo to 305Mo.

    With PDF file from scanning, it’s worth.

    In my code, I just have a C1PdfDocumentSource for loading file and a C1FlexViewer. Very simple.

    Loading from a file or from a Stream produce the same result.

    It’s when I browse pages that CPU usage getting growth.

    Sample here : sample_PDF_file.zip

    Thanks for your help

  • Posted 31 March 2021, 4:48 pm EST

    Hi,

    We have escalated this issue to the development team and will let you know when we have an update.

    [Internal Tracking Id: C1WIN-24682]

    Regards.

    Avnish

  • Posted 7 December 2021, 2:03 pm EST

    Hi,

    Our development team researched this issue and found that this is the designed behavior as the files you provided contains compressed images that are decompressed when displayed and cached to improve performance which results in an increase in memory usage.

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels