php-compatinfo icon indicating copy to clipboard operation
php-compatinfo copied to clipboard

Multicore support

Open yuri-ccp opened this issue 3 years ago • 1 comments

New Feature request

Multicore support

Summary

Currently many PHP systems increases in size. Each day more and more modular systems are made with many different libs and files. Not only each PHP version increases the comparison range and DB size of compatinfo. Even with the phpCompatInfo using 100% o a CPU this requires a lot time to scan those complex systems. One good solution to improve the scan time is to allow the phpCompatInfo to scan different files with different CPUs at same time then sumarize all then together.

Description

I'm not an expert in PHP to correctly describe how to do this exactly but maybe can be possible to divide the file list to scan during analyzer run in different queues equals to the currently available cores of the server and then use pcntl functions to paralelize the scan making one scanner for each queue. Other option is put all files in a stack and make the master process to distribute them between a number of threads equal to number of available CPUs.

This can improve the scan time a lot specially in servers with a large number o CPUs.

yuri-ccp avatar Jul 27 '22 23:07 yuri-ccp

It's a good proposal but it requires a lot of work, and I've actually few free time ! Perharps later in next months but I cannot schedule a date

llaville avatar Aug 12 '22 16:08 llaville