WordPress / WordPress/wordpress-playground

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

Open
#992 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Feature] PHP.wasm [Type] Enhancement
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

https://github.com/WordPress/wordpress-playground/pull/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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the hot-swap implementation introduced by pull request #990, focusing on the recreateMemFs helper and how the existing FS object is passed between PHP runtimes. Determine whether the old FS can be reused without copying its contents; done means hot-swapping works while avoiding that filesystem recreation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, wasm
Domain
operating-systems, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.