View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
5835 | Composr | core | public | 2024-08-03 22:12 | 2024-08-03 22:20 |
Reporter | Chris Graham | Assigned To | Guest | ||
Priority | normal | Severity | feature | ||
Status | new | Resolution | open | ||
Summary | 5835: Parallel block generation using Fibers (holding issue) | ||||
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. | ||||
Tags | Type: Performance | ||||
Attach Tags | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
Beyond AMPHP, there is also ReactPHP, Swoole and Hyperf. AMPHP seems most relevant though. Another complexity is right now to use AMPHP we'd have to plug in its modules to replace core querying and HTTP functionality in relevant cases, which would complicate things, be a lot of work, and potentially hurt performance in different ways. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-08-03 22:12 | Chris Graham | New Issue | |
2024-08-03 22:12 | Chris Graham | Tag Attached: Type: Performance | |
2024-08-03 22:14 | Chris Graham | Note Added: 0009065 | |
2024-08-03 22:20 | Chris Graham | Relationship added | related to 5836 |