ensureCapacityInternal(..)
public void setLength(int newLength) {
if (newLength < 0) {
throw new StringIndexOutOfBoundsException(newLength);
}
ensureCapacityInternal(newLength);
if (count < newLength) {
if (isLatin1()) {
StringLatin1.fillNull(value, count, newLength);
} else {
StringUTF16.fillNull(value, count, newLength);
}
} else if (count > newLength) {
maybeLatin1 = true;
}
count = newLength;
}
public AbstractStringBuilder delete(int start, int end) {
int count = this.count;
if (end > count) {
end = count;
}
Preconditions.checkFromToIndex(start, end, count, Preconditions.SIOOBE_FORMATTER);
int len = end - start;
if (len > 0) {
shift(end, -len);
this.count = count - len;
maybeLatin1 = true;
}
return this;
}
Измерить например в комфортности работы браузера.
PARTITION BY HASH(urlId)
PARTITIONS ...;