Descriptionencoding/gob: reduce decoder memory
Gob decoding reads a whole message into memory and then
copies it into a bytes.Buffer. For large messages this wastes
an entire copy of the message. In this CL, we use a staging
buffer to avoid the large temporary.
Update issue 2539
RSS drops to 775MB from 1GB.
Active memory drops to 858317048 from 1027878136,
essentially the size of one copy of the input file.
Patch Set 1 #Patch Set 2 : diff -r 2874979af37a https://code.google.com/p/go/ #Patch Set 3 : diff -r 2874979af37a https://code.google.com/p/go/ #Patch Set 4 : diff -r 2874979af37a https://code.google.com/p/go/ #
Total comments: 1
Patch Set 5 : diff -r ed493c4bb3e0 https://code.google.com/p/go/ #MessagesTotal messages: 4
|