Use github.com/mohae/deepcopy to deep copy worksheets instead of the internal deepcopy function that was using encoding/gob serialization and deserialization. Rationale: 1/ using `encoding/gob` is much slower than [`mohae/deepcopy`](https://github.com/mohae/deepcopy/) 2/ When building an application this implementation of `deepcopy` drags the `encoding/gob` package into the binary. And this package is much bigger than `mohae/deepcopy` (which only depends on `time` and `reflect`). ``` $ LC_ALL=C stat -f "%6z %N" $(go env GOPATH)/pkg/$(go env GOOS)_$(go env GOARCH)/github.com/mohae/deepcopy.a $(go env GOROOT)/pkg/$(go env GOOS)_$(go env GOARCH)/encoding/gob.a 10508 .../pkg/darwin_amd64/github.com/mohae/deepcopy.a 541818 .../pkg/darwin_amd64/encoding/gob.a ```formula
parent
9e463b4614
commit
4a1b406456
Loading…
Reference in new issue