Improve tag plugin performance