You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that after implementing envkey-php in my project page loading got at lot slower only when running inside my Docker container (I'm on and M1 Mac).
I decided to take a look at what was causing the slow down with a profiler and I found out that a shell exec called by envkeys-php's fetch() function was responsible, located at:
I decided to try and debug it, and found out that this class ends up matching envkey-source binary for linux/amd64 when used inside the container, which runs a lot slower than the linux/arm64 binary on my machine of course.
I believe the cause of this behavior lies on the code (in the snipped bellow) that calls php_uname('m') to determine the cpu arch, but it can only match 'arm', while running uname -m inside the container yields 'aarch64'.
What happened?
I noticed that after implementing envkey-php in my project page loading got at lot slower only when running inside my Docker container (I'm on and M1 Mac).
I decided to take a look at what was causing the slow down with a profiler and I found out that a shell exec called by envkeys-php's
fetch()
function was responsible, located at:envkey-php/src/Fetcher.php
Line 69 in fe151c6
The visualization of the profiler's results:
My analysis
I decided to try and debug it, and found out that this class ends up matching envkey-source binary for linux/amd64 when used inside the container, which runs a lot slower than the linux/arm64 binary on my machine of course.
I believe the cause of this behavior lies on the code (in the snipped bellow) that calls
php_uname('m')
to determine the cpu arch, but it can only match 'arm', while runninguname -m
inside the container yields 'aarch64'.envkey-php/src/Fetcher.php
Line 22 in fe151c6
System Information
Hardware: MacBook Air
Chip: Apple M1 (aarch64)
Memory: 8 GB
OS: macOS 14.5 (Sonoma)
envkey-php version
2.4.4
The text was updated successfully, but these errors were encountered: