#5835 - Parallel block generation using Fibers (holding issue)

Identifier #5835
Issue type Feature request or suggestion
Title Parallel block generation using Fibers (holding issue)
Status Open
Tags

Type: Performance (custom)

Handling member Deleted
Addon core
Description PHP Fibers (PHP 8.1+) are very interesting, and AMPHP is a very nice framework built on them:
https://github.com/amphp

The theory is we could build blocks in parallel. As soon as a block does something that would be blocking, like calling a URL or doing a query, it would let that run async and yield back to the block generation loop to start the next block. It would then wait for all blocks to finish generating.

Unfortunately the tech isn't quite there yet, and it's not as simple as it sounds. Most blocking comes from MySQL, but for parallel/async MySQL we would need to have multiple MySQL connections per process, which would itself be questionable in terms of performance (risk of any single request using too many resources, and too much time just initiating all these connections).

I don't think anything is actionable right now, but I wanted this on the tracker for further review and discussion.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated