performance improvements for annotation extraction