Skip to content

Use auto_globals_jit to make classic mode like worker mode for some use-cases #1917

@withinboredom

Description

@withinboredom

Describe your feature request

Is your feature request related to a problem? Please describe.

We (myself and @SpencerMalone) were discussing how to use workers to 'bootstrap' an application, then wait for a request, then die() to allow for classical applications to get some performance without having to rewrite them for worker mode.

Describe the solution you'd like

We could maybe specify in the caddyfile:

preheat public/index.php

for a route, then we spawn up some workers that start up the file and once a superglobal is accessed, we pause execution until a request comes through, fill in the superglobals, then continue the script. This requires the use of auto_globals_jit to make work, but older/custom applications will be able to take advantage of performance from frankenphp while implementing worker scripts.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions