The indexof method is used in the updateitem method, but the complexity of this method is O (n). Is it necessary to optimize this place?