FS#54959 - [python-protobuf] [python2-protobuf] cpp_implementation disabled
Attached to Project:
Arch Linux
Opened by Stephen Zhang (zsrkmyn) - Friday, 28 July 2017, 19:15 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 04 January 2019, 07:24 GMT
Opened by Stephen Zhang (zsrkmyn) - Friday, 28 July 2017, 19:15 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 04 January 2019, 07:24 GMT
|
Details
Description:
In current python{,2}-protobuf package, `--cpp_implementation` is not enabled, which causes bad performance. When I try load a 549MiB protobuf record, the current package in the repo takes about 8 minutes. However, after repacking the package with `--cpp_implementation`, it takes only several seconds. To run python{,2}-protobuf with `--cpp_implementation` compilation option requires protobuf package as its depends, which is already satisfied in the current PKGUBILD. Additional info: * package version(s) 3.3.2-1 There are some discussions on performance here[1], and a building spec here[2]. And the attachment is a patch for PKGBUILD. How to reproduce: In my case, the protobuf record can be found here[3], and the proto which defines the protocol can be found here[4]. They are really large things, so I list them here just for those who want to compare the performance. To reproduce it, 1. compile the caffe.proto with `protoc --python_out=. caffe.proto`. This will produce a caffe_pb2.py 2. run `python -c 'import caffe_pb2; net = caffe_pb2.NetParameter(); net.ParseFromString(open("VGG_ILSVRC_19_layers.caffemodel", "rb").read())'`. [1] https://github.com/google/protobuf/issues/880 [2] https://github.com/google/protobuf/blob/master/python/README.md [3] http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_19_layers.caffemodel [4] https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Friday, 04 January 2019, 07:24 GMT
Reason for closing: Fixed
Friday, 04 January 2019, 07:24 GMT
Reason for closing: Fixed
https://bugs.archlinux.org/task/60585
After applying the patch, I tried to build protobuf with `--cpp_implementation` and found that I could not compile it with clang/clang++. Changing to gcc/g++ worked.
FS#60585. I don't think a rebuild is required. Could you sign off on it?