Issue #21064:improve performance