mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00

Some CoreFoundation objects, such as those produced by CoreText, have expensive callbacks that run when they are released. By offloading the CFRelease calls to another thread, we can avoid important threads being blocked by unexpectedly expensive callbacks. This commit also changes the way that the coretext shaper's run iterator builds its string. Rather than using a CFMutableString, an ArrayList of unichars is built which is passed to CFStringCreateWithCharactersNoCopy, which is a lot more efficient since it avoids all the CoreFoundation overhead.