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
{{ message }}
Repository navigation
[Storage]: Improvement idea for StorageWrapper to allow calling register with client-creating-closure or separate registerClosure #9725
Main problem/friction we are having right now is that we have some parts of code that use file accesses via gs://bucketname/path/filename
Due to this in the overall init code for entire application we call
At the same time we have plenty of API call paths that do not interact with the google storage at all but some flow still may trigger it.
Due to this we are instantiating the client and loading lots of classes without actual need (only 100% confirmed at end of API request).
it would be possible to register a closure that will be executed only when any gs://bucketname/path/filename path is actually accessed and not before.
This became evident when using profiler mode in our deployment for simple ping/pong API endpoint and tracking what parts of code consume unneeded overhead.
In PHP 8.4+ it will be possible to use lazy ghost or proxy objects, but we are still stuck at 8.3 for a while.
Currently we implemented custom-made stream wrapper to achieve that closure-creation approach but possibly would be better to have it natively in the storage library.
Activity