MyBB Community Forums

Full Version: Global.php Processing Time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

since I've updated to 1.8 I got the problem of very slow loading times.

Somtimes (if everything is good) I got loading times of 500 ms.
But if I refresh the page or if I select another one I can get loading times up to 5 seconds.

MySQL is always fast (< 30ms) but Global.php has such high processing times.

Is there anything I can do?

The forum is running on a really powerfull Windows Machine using Apache.


Thanks in advance,
Fabio
Number of active users at a time?

Number of Posts / Threads?

What plugins are you using?
Maybe 10 Users at a time (But always the same)

1500 Posts

Plugins:
BestAds to Post (1.2.0)
DVZ Shoutbox (2.1.3)
Hide Links to Guests (1.0)
OUGC Pages (1.0)
PHP and Template Conditionals (2.0)
Private Message Log (1.0.1)
Register Time (1.2.1)
Thanks (3.9.2)
Welcome PM/Email (1.1)
Just to make sure, you are counting guests as well for number of users at a time?

Are PHP pages in general really slow, not just MyBB pages?

Server load?

You might also look into Cloudflare. Even their free level isn't bad.
Yea counting guests as well. But it doesn't matter how many Users are online. It happens always..

Only MyBB pages are slow.

Less than 5 % CPU usage

It's already using Cloudflare. Free level
Does it get any better if you go to settings and select "Yes" for disable all plugins?
Oh yea it does!
I spotted the plugin: phptpl.php

It allows me to use PHP code in template files. Is it possible to do that in another fast way?

I really need PHP in templates...
Exactly what do you use PHP in Templates for? Depending on what you are using it for, you might be able to use my Theme Variables plugin instead which is lightweight.
I created many Custom Pages. They all use PHP and MySQL to view a lot of data from the database.
I find it a bad practice to use PHP in templates instead of creating new pages using PHP. If you actually had them as normal pages instead of using PHP in templates most likely your page speed will be faster.

See this for how to do a new page and integrate it with MyBB: https://github.com/dragonexpert/tutorial...t.html#L97
Pages: 1 2