ddev / ddev-contrib

Contrib space for DDEV services, tools, snippets, and approaches.
Apache License 2.0
162 stars 162 forks source link

PHP GRPC - installation too slow #241

Closed gauravmanerkar closed 5 months ago

gauravmanerkar commented 6 months ago

GRPC installation is too slow. Can it be optimised somehow?

Dockerfile: https://github.com/ddev/ddev-contrib/blob/master/web-container-dockerfiles/grpc/Dockerfile

stasadev commented 6 months ago

Seems like an upstream problem:

gauravmanerkar commented 5 months ago

@stasadev Instead of pecl can we use some other alternative?

stasadev commented 5 months ago

The only alternative at this point is to build from source.

https://github.com/grpc/grpc/tree/1751f1043ed00cb064907bf6943c7fcad72516af/src/php#install-the-grpc-extension

rfay commented 5 months ago

But of course building from source will be much slower and also requires other packages to succeed. So you're probably stuck with the pecl approach.

rfay commented 5 months ago

You might be able to pre-build it and host the built version somewhere.

rfay commented 5 months ago

I was experimenting with this as an addition to docs. The pecl install does in fact do the compile from scratch, and of course the approach here does the full build on the first ddev start. I found it to be atrocious how much had to be compiled, gave up on it. And I was running it in highly performance, great internet-access gitpod instance.