Qt WebEngine takes ~200MB of installed size!

I’m working on reducing the installed size of Frescobaldi (a text editor of music sheets written in LilyPond language) as much as possible.
Consider that many users still do not want to use the flatpak version because of the huge amount of disk space required.

The current stable takes 542,5 MB, which is indeed a lot.

I’ve managed to reduce it to 492,7 MB. See this PR.

But I’ve realized that there’s a single huge file:

[📦 org.frescobaldi.Frescobaldi ~]$ du -sh /app/lib/x86_64-linux-gnu/* | sort -hr | head -15
193M	/app/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.0

193MB is a lot.
WebEngine is used by Frescobaldi to display the LilyPond documentation inside the app.

What do you recommend to do to reduce the size?

I recommend to not use QtWebEngine…[1]

The good news is that it’s likely shared on disk across installs (ostree depuplication), except that since it’s used as a base app, it’s only for the one build against the same version.

[1] There is something about convenience that come with drawbacks. This is one of them. It’s convenient to make the HTML thingy, but it comes at the cost of bloat.

Well, QtWebEngine is an optional dependency so I could remove it from the flatpak app. In case some user complains (unlikely), I might make an extension.

The current problem is that PyQt baseapp cleanup currently removes also QtPdf along with QtWebEngine and QtPdf is a mandatory Qt module for Frescobaldi. I’ve opened an issue to ask to keep QtPdf.

Eventually we should check if QtWebEngine might be replaced by QTextBrowser upstream. LilyPond documentation html files are fairly simple: no javascript, no complex CSS, no dynamic content.

This is about tradeoffs. And an extension isn’t worth that hassle either.

KDE 6.6 runtime is 1.1GB alone. I don’t think 200MB extra for QtWebEngine (likely shared with other apps) matters that much.

Well, any app needs a runtime and I don’t take it into account.

I’m thinking of a user who likes Flatpak in general and is already using other flatpak apps.
200MB out of 500MB taken to support an optional feature is not ideal. It’s about tradeoffs, as hub said.

I’ll wait for a reply from PyQtBaseApp maintainer and then take a decision.

Thanks for your feedback

Using webview ? That is something every user should have