]> Cypherpunks repositories - gostls13.git/commit
archive/tar: preallocate slice from paxHeaders
authorGyu-Ho Lee <gyuhox@gmail.com>
Sun, 5 Jun 2016 06:08:19 +0000 (23:08 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Tue, 16 Aug 2016 02:46:50 +0000 (02:46 +0000)
commit77e68ea78abc08f827041384e0198576da44db9f
tree8531eaa617f2d078eb44a0c5febd8074bce09871
parent2cb471e40dfe3d3ae1b0c777e67f3737a823ae79
archive/tar: preallocate slice from paxHeaders

Preallocate keys slice with the length of paxHeaders map
to prevent slice growth with append operations.

Change-Id: Ic9a927c4eaa775690a4ef912d61dd06f38e11510
Reviewed-on: https://go-review.googlesource.com/23782
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/archive/tar/writer.go