Fix critical UI performance issue (#1154)