KDE Review: Arianna

Carl Schwan carl at carlschwan.eu
Fri Mar 3 22:48:14 GMT 2023


Le dimanche 26 février 2023 à 4:53 AM, Kevin Kofler <kevin.kofler at chello.at> a écrit :

> Carl Schwan wrote:
>
> > I want to move Arianna to KDE review. Arianna is an ebook reader
> > currently only supporting epubs. This is based on top of epub.js
> > and QtWebEngine for the actualy rendering of ebooks as doing that
> > from scratch in Qt would be too much work.
>
>
> Okular has an EPub backend using libepub and QTextDocument. How does
> Arianna compare to that? I would expect native code to be more efficient
> than JavaScript especially on mobile devices, which are apparently
> Arianna's main target. But I do not know whether there are, e.g., EPub
> documents that Arianna can render and Okular cannot, so that is why I am
> asking how they compare.

Okular QTextDocument is quite inefficient see for example this long standing
bug: https://bugs.kde.org/show_bug.cgi?id=359932 Aside from being quite
inefficient, QTextDocument has only some basic HTML support and to have a
good support of Epubs you basically need a much better HTML/CSS support
which only a web engine can provide.

If someone wants to try to optimize the native code of Okular, they should
probably replace the old C and unmaintained based libepub library 
and replace it with [1] and [2] which should provide a better starting point.
(and nope, I'm not gonna do it, I'm already too busy with other things).

Carl

[1]: https://invent.kde.org/graphics/arianna/-/blob/master/src/epubcontainer.cpp
[2]: https://github.com/sandsmark/epubreader/blob/master/epubdocument.cpp


More information about the kde-core-devel mailing list