]> git.draconx.ca Git - rrace.git/commit
Performance improvements for runtime icon generation.
authorNick Bowler <nbowler@draconx.ca>
Thu, 12 Jan 2023 05:51:41 +0000 (00:51 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 12 Jan 2023 06:22:37 +0000 (01:22 -0500)
commit2345a9dba343693668ece5abbba1fe58e0e18ed8
tree64f81224c9df2948b52d62d6238e539a20437196
parenta8cba5fb49f78ae73e8002f3f2a45aaf3fb8cb71
Performance improvements for runtime icon generation.

As most of the rows for any given icon tile are the same as the
previously-generated row, it is not necessary to recompute the
colour values every single time.  The code can be adjusted to
re-use the previously-computed row instead.

Since the generic code now works on bytes, we can also replace the
open-coded loops in the row generation with a couple of memset calls,
which should help modern compilers produce more efficient output.

All this reduces the amount of computation done by the generic code
substantially, to roughly a quarter of what it was previously.

Also take the time to remove some unneeded complexity in the EWMH
formatting implementation, which further helps a little bit on the
code size front.
src/ewmhicon.c
src/icon.c