improve plugin performance