@devries-cameron20 / t3code Mirror · read-only / commits / a21f89d292
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 03:15 UTC

perf(mobile): stop iOS syntax highlighting from looking up a thread-local on every lexer call (#31187)

Cameron Chisholm committed Nov 6, 2026 at 00:31 UTC a21f89d292cea0166ecf2b44b319b7b882ee4b9f
1 file changed +4
apps/mobile/modules/t3-highlights/T3HighlightsNative.podspec
+4
@@ -18,6 +18,10 @@ Pod::Spec.new do |s|
18 # slower. They are generated code, so optimize them in every configuration.
19 s.compiler_flags = '-O2'
20 s.pod_target_xcconfig = {
21 + # Under C11, wasm2c makes its stack depth counter thread-local, so every lexer
22 + # function entry calls _tlv_get_addr (2–9% of lexing time on an iPhone 12).
23 + # Callers already serialize the lexer (t3_highlights.h), so a plain global is safe.
24 + 'GCC_C_LANGUAGE_STANDARD' => 'gnu99',
25 # Plain malloc memory with explicit bounds checks: no guard-page signal
26 # handlers competing with the app's crash reporting.
27 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) WASM_RT_USE_MMAP=0 WASM_RT_MEMCHECK_BOUNDS_CHECK=1 WASM_RT_SKIP_SIGNAL_RECOVERY=1',