The code size optimization used the standard dead code elimination, constant propagation and folding, peephole ASM optimizations. I also found that the hidden test suite had a defect where some valid code could be eliminated and it’s associated tests wouldn’t catch it, but forget the details. I informed them but they let me keep the savings.
I know how to send compiler errors in Racket IDEs using a macro (static code checks). I also made a macro which reads DB table column names and creates variables based on them, so the code would break based on typo checking against the actual table name.
The graphQL optimization came from suspiciously high serialization costs in python Apollo graphQL server. Something like 70% of time handling request in serialization. Someone else figured out a change to help here, it took some prodding them to keep looking for the right fix as 70% time in serialization seemed absolutely nuts.