How do I use multi-thread operation in PHP/Symfony?

by 2 replies
3
Hey Hey, Hope you all having a wonderful day.

I'm working on a web application that take data from database and process it. currently it takes one line at time. process it then goes to the next - it takes too long to process all data.

I wanted to know how i can speed up the processing by taking a multiple lines of data at time. i am using Symfony Framework.

I appreciate all your support and guidances.
Thank you for your time.
#programming #multithread #operation #php or symfony
  • Looks like some good advice over here for doing what you ask: https://stackoverflow.com/questions/...ads-in-php-cli

    Without knowing more details of what your trying to do, though, my gut instinct is that processing like this probably shouldn't happen on the same server that is servicing web requests. You may want to look into some kind of worker/job queue pattern to offload processing to a different machine that won't affect the performance of the website itself.
    • [ 1 ] Thanks
  • Thank you for your response! much appreciated.
    I will consider getting couple of server to separate the requests. Thanks again buddy!

Next Topics on Trending Feed