Performance enhancement for button handler (10ms)