I asked for opinions on Discord about whether we could place any limits on max AST size in order to limit size of arena to 4 GiB.
Upshot was definitely not in all cases, but maybe in majority. It needs research.
As starting point, Boshen suggested parsing all of https://github.com/elastic/kibana and measuring AST size. Do that!