It turns out calling StringOutputStream::Next()/BackUp() repeatedly is very costly in opensource protobuf because it keeps resize() the string back and forth. The current JSON conversion API suffers this problem and leads to ridiculously long parsing time: https://github.com/google/protobuf/issues/2305#issuecomment-257785492 This change fixes the problem but caching the buffer of Next() and avoid calling BackUp() as much as possible.pull/2355/head
parent
df8390790a
commit
bd158fc238
2 changed files with 20 additions and 14 deletions
Loading…
Reference in new issue