Optimizing BiDi UI