WordPress / WordPress/php-toolkit

Explore: Compiling Blueprints to independent PHP files

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Architecture V1
Dominant language
PHP
Stars
61
Forks
21
Avg merge
19h 34m
Merged PRs (30d)
7

Description

Executing Blueprint steps often involves spawning subprocesses, e.g. to activate a WordPress plugin in an independent environment that can crash without crashing the main PHP process.

However, in runtime like Playground, spawning a PHP sub-process might be expensive as it would require allocating twice the HEAP inside the browser and potentially require downloading PHP.wasm again.

Let's test the performance of in-browser sub-processes, and if it's bad, then Blueprints could be compiled as follows:

  1. Run PHP to turn a Blueprint into a series of smaller PHP files like step0.php, step1.php etc.
  2. Each file is an isolated container and is free to, e.g., include wp-load.php
  3. TypeScript runtime would run those files one by one. The PHP runtime would do the same thing.

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

Start by benchmarking in-browser PHP subprocesses, focusing on the cost of allocating another HEAP and downloading PHP.wasm again. If that approach performs poorly, evaluate compiling a Blueprint into isolated files such as step0.php and step1.php, then confirm that the TypeScript and PHP runtimes can execute them one by one.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, typescript
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.