Skip to content

PHP.hotSwapPHPRuntime: Reuse the FS object instead of copying its contents #992

Open

Description

@adamziel

#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.

Activity

  1. 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[/+] on Feb 2, 2024
  2. adamziel commented on Feb 29, 2024

    @adamziel
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions