stroke performance optimization