more performance improvement
avoid calling getDataItem in getItemMetadata.