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

2 replies
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.
#multithread #operation #php or symfony
Avatar of Unregistered
  • Profile picture of the author codexmonkey
    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.
    {{ DiscussionBoard.errors[11298073].message }}
  • Profile picture of the author sendizo
    Thank you for your response! much appreciated.
    I will consider getting couple of server to separate the requests. Thanks again buddy!
    {{ DiscussionBoard.errors[11298668].message }}
Avatar of Unregistered

Trending Topics