Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Dec 2015, 19:25
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
vBulletin 4 & PHP 7 - drastic speed improvement!

Refer to my blog post in case you want to make vBulletin 4 work on PHP 7 as well:
https://blog.technidev.com/vbulletin...aking-it-work/

-----

http://www.zend.com/en/resources/php...ow-about-php-7

So PHP 7 has been released and it offers significant new features, including drastic speed changes (2 times faster according to Zend!).

As expected, PHP 7 doesn't work with vBulletin 4. The main reason is because of "methods with the same name as their class will not be constructors in a future version of PHP" and a couple of other things. So for example, the class vB_Database may not have a method name called vB_Database that's used as a constructor.

Since I have the latest vBulletin 4 version installed and I don't expect any new version of vBulletin 4 anytime soon, I'll probably give it a shot and modify my forum to see if I can make it work with PHP 7.

I will definitely document the speed changes and let you guys know the results.
Anyone else who may be interested in this?

--------------- Added 05 Dec 2015 at 10:25 ---------------

After a couple of modifications, I managed to make vBulletin 4 work with PHP 7... and wow it loads so much faster. More than 2 times faster with PHP 7 and the OPCache module... wow. My mind is blown.

Note that all the numbers below are based on the TTFB (Time To First Byte).

Before the upgrade (PHP 5.4.45)
Homepage
409.31 - 429.84 - 389.37 - 401.51 - 389.75 - 426.69
~407.75ms average loading time

Forum Category
518.51 - 491.49 - 447.64 - 491.94 - 433.52 - 543.93
~487.84ms average loading time

Thread
326.34 - 399.72 - 387.09 - 383.79 - 370.03 - 375.21
~373.70ms average loading time

-----

After the upgrade (PHP 7 WITHOUT OPCache)
Homepage
289.79 - 291.41 - 289.11 - 253.45 - 285.06 - 259.98
~278.13ms average loading time

Forum Category
281.83 - 333.31 - 293.23 - 276.73 - 268.91 - 281.63
~289.27ms average loading time

Thread
221.73 - 344.83 - 257.84 - 250.72 - 250.04 - 220.07
~257.53ms average loading time

-----

After the upgrade (PHP 7 WITH OPCache)
Homepage
225.63 - 200.26 - 219.48 - 181.72 - 199.93 - 177.55
~200.76ms average loading time

Forum Category
194.95 - 184.47 - 237.45 - 182.62 - 185.93 - 178.06
~193.91ms average loading time

Thread
207.83 - 156.41 - 146.43 - 143.13 - 155.13 - 142.61
~158.59ms average loading time

__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.

Last edited by Dave; 05 Dec 2015 at 22:35.
Reply With Quote
  #2  
Old 05 Dec 2015, 11:02
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
Interesting. What did you have to do to make your site compatible?
__________________

Let us take care of your forum, seo, seo reports, maintenance, what ever you need.

Reply With Quote
  #3  
Old 05 Dec 2015, 11:09
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
On top of my head, I had to make changes to the following files:
  • includes/class_core.php (to fix constructor error)
  • includes/class_datastore.php (to fix constructor error)
  • includes/class_bbcode.php (to fix function name must be a string error)
  • includes/class_hook.php (to fix constructor error)
  • vb/exception/parser.php (to fix redefinition of argument error)
Also I had to change the datastore class in config.php back to vB_Datastore_Filecache since there's no PHP 7 version for APC/XCache or Memcached. You don't need it anymore anyway since OPCache has been introduced and it's extremely fast.

Another thing to keep in mind is that PHP 7 deprecates the mysql_* functions. In case you have any plugins or custom scripts installed which makes use of that then it will not work.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #4  
Old 07 Dec 2015, 21:05
Elite_360_'s Avatar
Elite_360_ Elite_360_ is offline
 
Join Date: Nov 2012
Originally Posted by Dave View Post
Since I have the latest vBulletin 4 version installed and I don't expect any new version of vBulletin 4 anytime soon
VB 4.2.4 beta 1 is coming out soon you should report the bug, and maybe it will be in VB 4.2.4
Reply With Quote
  #5  
Old 08 Dec 2015, 10:56
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Originally Posted by Elite_360_ View Post
VB 4.2.4 beta 1 is coming out soon you should report the bug, and maybe it will be in VB 4.2.4
I've seen a ticket for the error in vb/exception/parser.php.
I don't know how the other changes I've made affect earlier versions of PHP, so not sure if they want to bother "fixing" that since they officially don't even support PHP 7.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #6  
Old 08 Dec 2015, 16:55
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by Dave View Post
I've seen a ticket for the error in vb/exception/parser.php.
I don't know how the other changes I've made affect earlier versions of PHP, so not sure if they want to bother "fixing" that since they officially don't even support PHP 7.
The parser error was logged and fixed for php7 (by me) in vB5, I dont think its been logged for vB4 (or 3).

There is a Jira for vB4 php7 support, but thats about as far as its got atm (other than I have some test sites running).
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 08 Dec 2015, 17:49
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Performance about average, nothing amazing here. Assuming the site in your signature is the subject site. My sites perform significantly better.

http://www.webpagetest.org/result/151208_83_1K5H/
Reply With Quote
  #8  
Old 08 Dec 2015, 17:56
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Originally Posted by Max Taxable View Post
Performance about average, nothing amazing here. Assuming the site in your signature is the subject site. My sites perform significantly better.

http://www.webpagetest.org/result/151208_83_1K5H/
No, it's not. It's just a very basic PHP site (not related to vBulletin).
I get an average TTFB of 20ms on that site.

--

The location of the test server at webpagetest.org affects the final result by a lot, which is why you can't use that as a reliable tool to find out how fast a site is unless you test it from America, Asia and Europe and compare the results.

Also if I compare my own results in Chrome's developer tools with the results of webpagetest.org, it doesn't match.
If I clear my browser and DNS cache, the first load of https://technidev.com (located in Amsterdam) takes 1.50 seconds, yet webpagetest.org (Amsterdam server) states 5 seconds.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.

Last edited by Dave; 08 Dec 2015 at 18:07.
Reply With Quote
  #9  
Old 08 Dec 2015, 18:11
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by Dave View Post
The location of the test server at webpagetest.org affects the final result by a lot, which is why you can't use that as a reliable tool to find out how fast a site is unless you test it from America, Asia and Europe and compare the results.
It's just real browsers with real connections, not servers at all. It's volunteer real-world computers, and the location really doesn't matter that much but the connection sure does. I test everything with one set of parameters, I don't test-shop. I optimize to worst case, not to what I might get on my own computer - that's not objective.

Care to provide a link to this super fast php7 vB4?
Reply With Quote
  #10  
Old 08 Dec 2015, 18:22
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
I'm not trying to be a snark, I just see claims of millisecond load speeds and want to see that put to a real test. I've never seen millisecond load speeds.
Reply With Quote
  #11  
Old 08 Dec 2015, 18:23
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
I'm talking about TTFB, not complete page load. (Which is also what I stated in my first post in case you didn't see that.)

http://www.webpagetest.org/result/151208_TR_1KFJ/

Keep in mind that PHP only affects the TTFB. As you can see, it matches the results I posted in my first post.
The forum itself uses quite some images and other third party resources so it's not the fastest when it comes to the complete page load.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #12  
Old 08 Dec 2015, 18:32
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by Dave View Post
(Which is also what I stated in my first post in case you didn't see that.)
Is this after your edit? Because I sure don't recall seeing anything about FBT.
webpagetest.org/ result/151208_TR_1KFJ/
I don't test using Chrome, because by design and to give the false illusion of being "faster" it ignores certain types of calls. I always test worst case, which is IE11.

http://www.webpagetest.org/result/151208_3G_1M6Y/

FBT is nebulous, and depends on many factors. For example, if you use Cloud Flare (which you are) it is proven to greatly slow FBT. There's many other variables involved including just good old fashioned response of the host server at different times and load conditions.

You deliver 73 requests and 1.4 megabytes. 9 seconds for that isn't murder.
Reply With Quote
  #13  
Old 08 Dec 2015, 19:07
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
We're going completely off-topic though, you are talking about the complete page load while I'm talking about the time it takes for PHP to process the request.

If you don't believe that PHP 7 makes vBulletin fast (so that is vBulletin's server side processing), then that's fine. I highly recommend you to try it out yourself though.

However when it does come to the complete page load, I rather rely on my own findings instead of a "reliable" web page testing service.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #14  
Old 08 Dec 2015, 19:15
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by Dave View Post
We're going completely off-topic though, you are talking about the complete page load while I'm talking about the time it takes for PHP to process the request.

If you don't believe that PHP 7 makes vBulletin fast (so that is vBulletin's server side processing), then that's fine. I highly recommend you to try it out yourself though.
I neither believe it nor disbelieve it. If you believe it that's fine with me. I merely choose to work on full seconds reduction, than tiny milliseconds. I could take at least 5 seconds off your full load time with only about 30 minutes work.

However when it does come to the complete page load, I rather rely on my own findings instead of a "reliable" web page testing service.
A "reliable" one that's not trying to sell you anything, and is designed, operated and maintained by Google's tech chief, Patrick Meenan. And is the only objective real-world real-browser real-connection optimization standard out there.

Seconds count, not milliseconds. Bang for the buck - your time is worth something.

Congrats though on getting v4 up to the new PHP standard, that's good work but it doesn't help page load time significantly. And certainly not drastically.
Reply With Quote
  #15  
Old 08 Dec 2015, 19:58
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
It does help page response time significantly, if you refuse to believe that then there's nothing much I have to say. Also a handful of my users reported to me that they noticed a big difference.

I guess you'll see more posts of users regarding the speed difference in the future when they start to migrate to PHP 7.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:12.

Layout Options | Width: Wide Color: