By optimised I mean I moved the palettisation to a Unity Job, using NativeArray instead of regular arrays for moving the pixels around.
Finally writing them out to disk with a ported C# version of lecram/gifenc in a background thread using UniTask's thread pools.