Download the PHP package zepgram/module-multi-threading without Composer

On this page you can find all versions of the php package zepgram/module-multi-threading. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-multi-threading

Multi-Threading for Magento 2

This module is a powerful tool for developers who want to process large data sets in a short amount of time. It allows you to process large collections of data in parallel using multiple child processes, improving performance and reducing processing time.

Installation

Usage

These classes allows you to process a search criteria, a collection or an array using multi-threading.

ForkedSearchResultProcessor

ForkedCollectionProcessor

ForkedArrayProcessor

This class allows you to process an array of data using multi-threading.

ParallelStoreProcessor or ParallelWebsiteProcessor

bin/magento thread:processor command

This command allows running a command indefinitely in a dedicated thread using the Process Symfony Component.

Options

How it works

The thread:processor command creates a dedicated child process to execute existing command line. The child process runs the command specified by the user, while the parent process monitors the child process and can act accordingly. You can define iterations and execute the same command multiple times with a dedicated child foreach execution.

The ForkedSearchResultProcessor,ForkedCollectionProcessor and ForkedArrayProcessor classes use a similar approach to process a search criteria or a collection. The process is divided into several pages, and for each page, a child process is created to run the callback function specified by the user on each item of that page.

The ParallelStoreProcessor and ParallelWebsiteProcessor classes are designed to make it easier to process a list of stores or websites in parallel. To use either of these classes, you'll need to provide a callback function that will be called for each store or website in the list. The callback function should take one parameter, which will be a single store or website object.
Each store or website will be passed to the callback function in a separate process, allowing faster processing times. The number of children process cannot exceed the number of stores or websites: for example, if you have 10 stores, the maximum number of child processes that can be created in parallel is 10.

Here is a breakdown of the parameters:

Memory Limit

This module allows to bypass the limitation of the memory limit, because the memory limit is reset on each child process creation. This means that even if the memory limit is set to a low value, this module can still process large amounts of data without running out of memory. However, it is important to keep in mind that this also means that the overall resource usage will be higher, so it is important to monitor the system and adjust the parameters accordingly.

Limitations

This module uses pcntl_fork() function which is not available on Windows.

Conclusion

This module provides a useful tool for running commands or processing collections and search criteria in a multi-threaded way, making it a great solution for improving performance and reducing execution time. The module is easy to install and use, and provides options for controlling the number of child processes, timeout, and environment variables.

Disclaimer

The Multi-Threading for Magento 2 module is provided as is, without any guarantees or warranties. While this module has been tested and is believed to be functional, it is important to note that the use of multi-threading in PHP can be complex and may have unintended consequences. As such, it is the responsibility of the user of this module to thoroughly test it in a development environment before deploying it to a production environment. I decline all responsibility for any issues or damages that may occur as a result of using this module. With great power comes great responsibility, use it wisely.


All versions of module-multi-threading with dependencies

PHP Build Version
Package Version
Requires magento/framework Version ^101.0.0|^102.0.0|^103.0.0
magento/module-store Version ^101
ext-pcntl Version *
ext-posix Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zepgram/module-multi-threading contains the following files

Loading the files please wait ....