Shaped text is cached using all the shaping parameters as well as the text itself as a key. This makes text shaping a non-issue for imui when the text is stable, taking my simple test from 120fps to 1000fps (optimized build).