stable

Clone or download

Read-only

Preload FFI bindings during startup

This make possible to use FFI during a standard web call while keeping `ffi.enable=preload`. It also avoids the cost of parsing multiple times the FFI bindings which is a good thing for a performance point of view. Note that it means that any change made to the FFI binding or the associated class now require to restart PHP FPM to be taken into account. The existing preloading infrastructure that was trying to preload a large part of the Tuleap core and plugins. It has been simplified to only cover what we need for our FFI call. Expanding it is outside the scope of this contribution and changes should be profiled, PHP 8.1 comes with an inheritance cache that might already get us most of the performance benefit. There is no functional change (but you can use `\Tuleap\WebAssembly\FFIWASMCaller` in web call and not only via the CLI), to test you need to: * build and redeploy the `tuleap-wasmtime-wrapper-lib` package * deploy the `99-tuleap.ini` file into `/etc/opt/remi/php81/php.d/` * restart PHP FPM to those changes are taken into account Part of story #31077: deploy a WebAssembly module to validate incoming references as a pre-receive hook Change-Id: I8b52f23d88b0e1583df32b7bebb22c90c25f13e9

Modified Files

Name
M Makefile +1 −3 Go to diff View file
M preload.php +4 −8 Go to diff View file
M src/additional-packages/wasmtime-wrapper-lib/cbindgen.toml +1 −1 Go to diff View file
M src/common/WebAssembly/FFIWASMCaller.php +21 −16 Go to diff View file
M src/common/WebAssembly/WASMCaller.php +3 −0 Go to diff View file
A src/etc/php.d/99-tuleap.ini +5 −0 Go to diff View file
M tools/rpm/Makefile +1 −1 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +10 −1 Go to diff View file