[okular] [Bug 471792] New: Annotations greatly increase PDF file size and massively slow down Okular

Joe Breuer bugzilla_noreply at kde.org
Fri Jun 30 12:22:39 BST 2023


https://bugs.kde.org/show_bug.cgi?id=471792

            Bug ID: 471792
           Summary: Annotations greatly increase PDF file size and
                    massively slow down Okular
    Classification: Applications
           Product: okular
           Version: 22.12.3
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: kde at jmbreuer.net
  Target Milestone: ---

SUMMARY

Adding annotations to a run-of-the-mill PDF file (out of pdfLaTeX, I presume)
hugely increases the file size with each additional annotation.

STEPS TO REPRODUCE
1. Open a PDF file
2. Add a couple of annotations (I mostly used Inline Notes, but also some
underlines and Pop-up Notes)
3. Save as PDF

OBSERVED RESULT

Saving my 6.4 MB sample PDF with very few test annotations and saving as PDF
yields a 7.4 MB file.

Removing those and adding a couple of 'real' annotations, the saved PDF weighs
in at 20.7 MB.

Changing font size of two Inline Note annotations after they have been created
yields a huge PDF of 143.4 MB.

With the increase in file size also comes an increase in CPU usage to the point
that Okular slows down and becomes practically unusable (especially /
immediately noticable with the "resized font" case).

EXPECTED RESULT

Annotations should only slightly increase file size and not strongly affect
interactive performance.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: gentoo Linux 2.13, Kernel 6.1.31-gentoo (64-bit)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION

Since attachments cannot exceed 4000kB, and all my samples are larger than
that, I've put together my sample files here:
https://github.com/jmbreuer/heap/tree/main/kde-okular-bug-20230630

I've also seen bug #470128, and also noticed that changing the font size of an
Inline Note annotation after adding it would hugely increase the file size
(changing two notes, from those 6.4/7.4 MB to 143.4 MB).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list