optimize point split, which reduce unnecessary allocate

pull/8496/head
lrita 2017-06-15 16:28:49 +08:00
parent 0b4528b26d
commit 72fcf6283e
1 changed files with 1 additions and 1 deletions

View File

@ -1708,7 +1708,7 @@ func (p *point) UnixNano() int64 {
// string representations are no longer than size. Points with a single field or
// a point without a timestamp may exceed the requested size.
func (p *point) Split(size int) []Point {
if p.time.IsZero() || len(p.String()) <= size {
if p.time.IsZero() || p.StringSize() <= size {
return []Point{p}
}