Fix autocompletion performance issues.