[Ohrrpgce] SVN: teeemcee/11605 Rewrite Palette16 cache. Just load whole .pal instead.

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Tue Feb 11 03:17:22 PST 2020


teeemcee
2020-02-11 03:17:21 -0800 (Tue, 11 Feb 2020)
605
Rewrite Palette16 cache. Just load whole .pal instead.

The palette cache was VERY slow especially in large games due to the heavy use
of strings, and even a trimpath() call. Most of the time was spent locking and
unlocking the FB string mutex. I didn't realise that operations on FB strings
in a multi-threaded program are so slow.

Creating a sprite slice is now faster depending on how many palettes were in
the cache, e.g. over 10x faster in jade.rpg.

As well as being simpler than the old cache, now all Palette16's have a refcount
(it is never NOREFC) so I could remove some kludges in render_text.
---
U   wip/allmodex.bas
U   wip/allmodex.bi
U   wip/allmodex.h
U   wip/custom.bas
U   wip/game.bas
U   wip/loading.rbas
U   wip/yetmore2.bas


More information about the Ohrrpgce mailing list