Page MenuHomeSolus

Arc theme binary compilation to improve UI performance
Closed, InvalidPublic

"Like" token, awarded by alarsyo."Like" token, awarded by subpop."Like" token, awarded by meimei346."Like" token, awarded by arpan-chavda."Yellow Medal" token, awarded by Timalex.
Assigned To
Authored By
andresclari, Sep 26 2016


Perplexing as it is, standard in place GTK3 css themes, are re-parsed and loaded on each app startup... Which is not very efficient... to say the least.

Turns out that eventually the Gnome people figured as much, and that's why Adwaita ships precompiled already. By doing this, basically the theme is loaded, and hot in memory for all apps to use, without having to fetch anything new.

Since by default Arc is the signature look of Solus, it makes sense to have it also precompiled for a better user experience. But we don't have to build it into the desktop itself, we can just precompile it a "gresource" binary that lives in the standard location, and it's transparent no normal use.

Given that the theme is coded in sass to begin with directly altering it is not a reasonable thing to do, and so we don't loose anything by having the installed theme in binary form, specially when accessing the sources is easy enough if want actually wants to fiddle with it.

So I patched the theme compilation to automatically precompile this "gresource" binary, and install it in place of the normal theme files.

I submitted a pull request to upstream, but in case we might want to implement it directly until it's fully upstreamed, I'm posting the patch here for review / thoughts.

It's not a massive jump in performance, but it's noticeable even on a fast machine.

Upstream pull request

Standalone patch

Event Timeline

siru added a subscriber: siru.Sep 26 2016, 7:52 AM
subpop awarded a token.Oct 8 2016, 5:57 PM
DataDrake closed this task as Invalid.Dec 29 2016, 3:11 AM
DataDrake added a subscriber: DataDrake.

I'm going to leave this up to horst3180 to make the call in upstream. If he merges the pull request, we can re-evaluate this later.