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.hotSwapPHPRuntime: Reuse the FS object instead of copying its contents #992

Open
adamziel opened this issue Feb 2, 2024 · 1 comment
Labels

Comments

@adamziel
Copy link
Collaborator

adamziel commented Feb 2, 2024

#990 introduced the ability to hot-swap PHP runtimes. Unfortunately, I didn't find an easy way of reusing the existing FS object and had to introduce a recreateMemFs helper that copies the data to the new filesystem.

Perhaps that's unnecessary. Let's explore reusing the old FS object directly.

@adamziel adamziel changed the title PHP.hotSwapPHPRuntime: Reuse the FS object instead of copying the contents PHP.hotSwapPHPRuntime: Reuse the FS object instead of copying its contents Feb 2, 2024
@adamziel
Copy link
Collaborator Author

adamziel commented Feb 29, 2024

Perhaps the same PROXYFS technique as used in #1069 would work here. I'm just worried it would require retaining the entire HEAP of the original PHP instance even after that process is killed.

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

No branches or pull requests

1 participant