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

2023-07-04 Thread Sune Vuorela
https://bugs.kde.org/show_bug.cgi?id=471792

--- Comment #6 from Sune Vuorela  ---
(In reply to Joe Breuer from comment #2)
> Trying a 23.07 bump is not immediately accessible to me, since there's
> apparently no release or even git tag yet. Not sure that I want to run git
> master on a production system.

Just fyi; 23.07 is now released.

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

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

2023-07-03 Thread Joe Breuer
https://bugs.kde.org/show_bug.cgi?id=471792

Joe Breuer  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Joe Breuer  ---
(In reply to Sune Vuorela from comment #4)
> (In reply to Joe Breuer from comment #3)
> > What method/tool do you use to obtain this information?
> 
> poppler source package (Often in a binary package like poppler-utils or
> poppler-tools) contains pdffonts tool that list all of the fonts in the pdf
> file.

Ah, that's great to know!

> > > With poppler 23.06, adding annotations should grow the document with
> > > approximately 600k. With poppler 23.07, it should grow the document with
> > > approximately 300 k, assuming noto sans (okular default) is used.
> > 
> > Is that to be expected "per each annotation", or once per adding annotations
> > at all, or per annotation type, ...?
> 
> Technically, it is per different font, assuming every font is as big as Noto
> Sans and compresses with zlib similar to Noto Sans.

Ah thanks, I get it and know where to look now!

I've added another example using Okular 23.02.4 (with/against Poppler 23.06.0),
and that noticeably keeps a stable file size also when adding multiple
annotations. It is somewhat smaller than the Okular 22.12.3/Poppler
23.06.0/built against Poppler 23.01.0 sample, the difference seems to be down
to Okular 23 only embedding Noto Sans, not Noto Sans and Noto Sans Regular
both.

So - for my purposes - Poppler 23.06.0 and possibly Okular 23.02.4 are the
required combination for a PDF annotation workflow without... "file size and
performance surprises."

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

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

2023-07-03 Thread Sune Vuorela
https://bugs.kde.org/show_bug.cgi?id=471792

--- Comment #4 from Sune Vuorela  ---
(In reply to Joe Breuer from comment #3)
> (In reply to Sune Vuorela from comment #1)
> > Some versions did embed the same fonts multiple times, and your "big"
> > document contains ~140 copies of noto fonts
> 
> What method/tool do you use to obtain this information?

poppler source package (Often in a binary package like poppler-utils or
poppler-tools) contains pdffonts tool that list all of the fonts in the pdf
file.

> I've added a corresponding sample:
> https://github.com/jmbreuer/heap/tree/main/kde-okular-bug-20230630

That file embeds noto sans and noto sans regular. It seems to have grown with
1.5 mb. For two fonts that's not that much off.

> > With poppler 23.06, adding annotations should grow the document with
> > approximately 600k. With poppler 23.07, it should grow the document with
> > approximately 300 k, assuming noto sans (okular default) is used.
> 
> Is that to be expected "per each annotation", or once per adding annotations
> at all, or per annotation type, ...?

Technically, it is per different font, assuming every font is as big as Noto
Sans and compresses with zlib similar to Noto Sans.

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

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

2023-07-02 Thread Joe Breuer
https://bugs.kde.org/show_bug.cgi?id=471792

--- Comment #3 from Joe Breuer  ---
(In reply to Sune Vuorela from comment #1)
> Some versions did embed the same fonts multiple times, and your "big"
> document contains ~140 copies of noto fonts

What method/tool do you use to obtain this information?

> It should be fixed in version 23.06 of the poppler library.

Simply upgrading my poppler library to 23.06 still gives me PDFs increasing
significantly in size with each additional annotation, though by far by not as
much as with 23.05.

I've added a corresponding sample:
https://github.com/jmbreuer/heap/tree/main/kde-okular-bug-20230630

In "About Backend", my Okular 22.12.3 now displays "Using Poppler 23.06.0,
Built against Poppler 23.01.0".
Building this version of Okular against Poppler 23.06.0 yields a compile error,
I'll see about trying out a newer Okular version.

> With poppler 23.06, adding annotations should grow the document with
> approximately 600k. With poppler 23.07, it should grow the document with
> approximately 300 k, assuming noto sans (okular default) is used.

Is that to be expected "per each annotation", or once per adding annotations at
all, or per annotation type, ...?

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

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

2023-06-30 Thread Joe Breuer
https://bugs.kde.org/show_bug.cgi?id=471792

--- Comment #2 from Joe Breuer  ---
(In reply to Sune Vuorela from comment #1)
> What version of the underlying Poppler library are you using ?

23.05

> Some versions did embed the same fonts multiple times, and your "big"
> document contains ~140 copies of noto fonts

Ah, thank you! That makes (altogether too much) sense.

> It should be fixed in version 23.06 of the poppler library.
> 
> With poppler 23.06, adding annotations should grow the document with
> approximately 600k. With poppler 23.07, it should grow the document with
> approximately 300 k, assuming noto sans (okular default) is used.

I'll have a look into that very shortly and let you know - 23.06 looks to be
available in gentoo 'testing'.
Trying a 23.07 bump is not immediately accessible to me, since there's
apparently no release or even git tag yet. Not sure that I want to run git
master on a production system.

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

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

2023-06-30 Thread Sune Vuorela
https://bugs.kde.org/show_bug.cgi?id=471792

Sune Vuorela  changed:

   What|Removed |Added

 CC||k...@pusling.com

--- Comment #1 from Sune Vuorela  ---
What version of the underlying Poppler library are you using ?

Some versions did embed the same fonts multiple times, and your "big" document
contains ~140 copies of noto fonts

It should be fixed in version 23.06 of the poppler library.

With poppler 23.06, adding annotations should grow the document with
approximately 600k. With poppler 23.07, it should grow the document with
approximately 300 k, assuming noto sans (okular default) is used.

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