]> git.draconx.ca Git - liblbx.git/commitdiff
lbximg: Improve performance of PAM output.
authorNick Bowler <nbowler@draconx.ca>
Wed, 22 Sep 2021 05:24:25 +0000 (01:24 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 22 Sep 2021 05:24:25 +0000 (01:24 -0400)
The PAM output currently calls fwrite for every pixel, which amounts to
about half a million fwrite calls to output a full screen image.  For a
fullscreen animation like logo.lbx.001, the majority of the execution
time is spent in fwrite.

Let's reduce this a lot by formatting and outputting an entire row at
a time, which almost completely eliminates fwrite from the profile.


No differences found