1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 What is deferred.php and why might it be hit repeatedly

Discussion in 'Troubleshooting and Problems' started by TheLaw, Aug 11, 2015.

  1. TheLaw

    TheLaw Well-Known Member

    I'm now in the optimizing stage and I've watched some pages load a little slowly with the main problem being this. What is deferred.php and what does it do? To be honest, it's on a popular addon page but this file apparently relates to the Xenforo core so I'm going to ask what it does. I've noticed more drag with certain addons and I'll let the developers know...

    deferred.png
     
  2. Daniel Hood

    Daniel Hood Well-Known Member

    XenForo introduced the deferred system to help slow processes from affecting the user's experience. Something that takes a long time is tossed into the deferred queue and run on the client side by the user's browser in the background.
    XF 1.2 - Assorted Small Things
     
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    Deferred shouldn't be called more than once per page, however.
     
  4. TheLaw

    TheLaw Well-Known Member

    The deferred.php hits are now gone. It was not due to a plugin. They just.... vanished.
     
  5. Daniel Hood

    Daniel Hood Well-Known Member

    Unless more deferred returns true, right? Like if there's a backlog of tasks for some reason.
     
  6. TheLaw

    TheLaw Well-Known Member

    That's a lot of backlogged tasks that just happened to accumulate and after 1-2 minutes, were gone. Not sure how and why they would be relevant to the loading of that page. I'll keep an eye on it.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Which page/add-on is it?
     
  8. Mike

    Mike XenForo Developer Staff Member

    Correct. Long running tasks will automatically retrigger after "completing". Or if you have a large number of pending jobs. We had a ticket recently caused by over 200,000 jobs pending (in this case, due to a huge amount of thread moves).
     
  9. Daniel Hood

    Daniel Hood Well-Known Member

    The thing is, they aren't actually connected to the page you're on. It has more to do with the page you were on before that one. Plus, it could be someone else that actually trigger the call, you're just the one running it. The way it works is if I do something to do trigger a deferred task, the next person to load any page of the forum, is going to be the one that actually processes the task in the background of their browser.
     
  10. TheLaw

    TheLaw Well-Known Member

    Thank you all for the explanation of what seems to be just an occasional blip.
     

Share This Page