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

How to troubleshoot an extremely slow installing addon?

Discussion in 'XenForo Development Discussions' started by TheBigK, Sep 4, 2015.

  1. TheBigK

    TheBigK Well-Known Member

    My addon is pretty simple but I found out that it takes 3x the time to install and the installer sometimes get stuck showing a button to continue to the process. There is no error log or an error thrown.

    Where do I look for repairing it?
     
  2. Jake B.

    Jake B. Well-Known Member

    If it's building templates and such there really isn't anything you can do. Do you have a lot of add-ons or styles?
     
  3. TheBigK

    TheBigK Well-Known Member

    Not really. I've about 12 addons functional; and those are the most popular ones here on XF. I can deal with a slow installing addon, but not something that gets stuck while running deferred.
     
  4. 0ptima

    0ptima Well-Known Member

    @TheBigK Setup a php debugger to step through the code. If you use the phpED IDE, there is a built in debugger.
     
  5. TheBigK

    TheBigK Well-Known Member

    Sounds like a way to do it. I've a feeling that my addon's not getting the templates right. Will the debugger catch problems with the templates?
     
  6. 0ptima

    0ptima Well-Known Member

    It should lead you to the right line of php code that is taking a long time to execute.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I think I see the problem.

    It should be building templates instead.
     
  8. TheBigK

    TheBigK Well-Known Member

    My addon basically accesses XenForo 2.0 code base on Kier's machine and builds the templates as soon as he writes them. Kier needs to speed up, IMHO.
     
  9. Jake B.

    Jake B. Well-Known Member

    I'm not entirely sure. But my phone seemed to believe tomatoes was the correct word in this circumstance. Google would never lie to me, right? :eek:
     

Share This Page