Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] New version of upb, and a new hash function wyhash in third_party. #8000

Merged
merged 7 commits into from
Nov 3, 2020

Conversation

haberman
Copy link
Member

@haberman haberman commented Nov 2, 2020

This brings a bunch of upb performance improvements, particularly in descriptor loading. PHP should see a significant improvement in the speed of imports of generated classes.

This includes two sets of optimizations to descriptor loading:

So overall I anticipate that Ads will see a >2x speedup in the up-front cost of importing protobuf types.

@haberman haberman merged commit 1dd4834 into protocolbuffers:master Nov 3, 2020
@haberman haberman deleted the php-upb-update branch December 6, 2020 20:27
@stouset
Copy link

stouset commented Jan 21, 2021

Building from source fails due to not finding wyhash.

$ cat Gemfile | grep google-protobuf
gem 'google-protobuf', git: 'https://github.com/protocolbuffers/protobuf'
$ bundle
…
convert.c:44:10: fatal error: 'third_party/wyhash/wyhash.h' file not found
#include "third_party/wyhash/wyhash.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
make: *** [convert.o] Error 1

I'm guessing the appropriate -I flag isn't passed to the compiler, as the third_party directory is in the toplevel of the project, and not available in the ruby subdirectory.

@stouset
Copy link

stouset commented Jan 21, 2021

Adding

find_header('third_party/wyhash/wyhash.h', '../../../..')

to extconf.rb appears to resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants