[Refactoring] Speed up context menu popup.