Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 12-04-2015, 06:25 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 [DATE]1449314753[/DATE] at [TIME]1449314753[/TIME] ---------------

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

Reply With Quote
4 благодарности(ей) от:
Alan_SP, Dragonsys, Manoel J?nior, z3r0
  #2  
Old 12-05-2015, 10:02 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting. What did you have to do to make your site compatible?
Reply With Quote
  #3  
Old 12-05-2015, 10:09 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
2 благодарности(ей) от:
RichieBoy67, Stratis
  #4  
Old 12-07-2015, 08:05 PM
Elite_360_'s Avatar
Elite_360_ Elite_360_ is offline
 
Join Date: Nov 2012
Location: New Hampshire
Posts: 518
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Благодарность от:
Alan_SP
  #5  
Old 12-08-2015, 09:56 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #6  
Old 12-08-2015, 03:55 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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).
Reply With Quote
2 благодарности(ей) от:
Alan_SP, RichieBoy67
  #7  
Old 12-08-2015, 04:49 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 12-08-2015, 04:56 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #9  
Old 12-08-2015, 05:11 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 12-08-2015, 05:22 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04299 seconds
  • Memory Usage 2,271KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (9)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete