Does PHP sleep helps in CPU usage and resources?

Discussion in 'PHP' started by thankyou, Sep 8, 2010.

  1. #1
    Hi PHP Programmers

    Does anyone know if the php function sleep() can help to reduce server resources?
    Let's say I have 1000 queries. But every 50 queries, I use sleep(), will it help?
     
    thankyou, Sep 8, 2010 IP
  2. secureax

    secureax Member

    Messages:
    22
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    It depends on your program and what you do for your 1k queries.
     
    secureax, Sep 8, 2010 IP
  3. thankyou

    thankyou Well-Known Member

    Messages:
    558
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Let's say if the 1k queries is taking the usernames of twitter users. So most probably my script will be looking through at the browse page of twitter and extracting usernames from there.
     
    thankyou, Sep 8, 2010 IP