Magento在php7下速度测试
来源:互联网 发布:lol断开连接说网络不稳 编辑:程序博客网 时间:2024/05/22 12:52
Magento performance is a recurrent problem for all developers and store owners. But PHP 7 is coming and you should think about using it very soon, benchmark is amazing!
Introduction
PHP community is waiting for it since months and PHP 7 is now Release Candidate as I am writing this article. It means that you are already able to test it against all your PHP applications and report any bug you found. I won’t talk about all the awesome features coming but rather focus on its usage with Magento.
Magento is based on its own framework that is also based on the Zend Framework which make any request using hundreds of PHP files and lines of code. It has always been a problem and you have probably tried all the possible improvements such as FPC, Magento Compilation, PHP and OPcache tweaking, Varnish or anything else that would have relieved your Magento installation. It is still useful to use these solutions but you can now also consider using PHP 7 really soon. I have made some basic benchmarking with PHP 5.5, PHP 5.6 and PHP 7 on a fresh Magento 1.9.2.0 installation with sample data installed. Results are amazing!
Benchmarking Magento 1.9 and PHP 7 (with sample data)
I have made these tests on my own MacBook Pro from the terminal. Hardware don’t really matter here since tests are all ran on a same basis. I have called all the URLs of the Magento Demo Store 5 times with cURL requests and for each PHP version.
Here is the result:
PHP 5.5
Show Details
PHP 5.6
Show Details
PHP 7.0
Show Details
Make your own tests
A minor incompatibility has to be fixed before using Magento with PHP 7.
You have to modify the file app/code/core/Mage/Core/Model/Layout.php
on line 555
:
Modify the line so it looks like this:
$this->getBlock($callback[0])->{$callback[1]}();
Conlusion
PHP 7 is still in Release Candidate state and should not be used in any production website yet of course. But just be aware of the upcoming releases and go make your own tests. This version is going to revolutionize PHP usage and applications. Can’t wait testing it with Magento 2
原文地址:http://www.bubblecode.net/en/2015/07/24/magento-php-7/
注:1、原作者做这个测试的时候php7还不是正式版,现在php7正式版已经发布了
2、Magento1.9要正常在php7环境跑起来,需要修改Mage_Core_Model_Layout类的代码,不过这个仅仅是保证跑起来,不能保证所有功能细节在php7环境下都正常,需要做更多严密的测试,期待Magento官方过段时间能提供补丁包来支持php7
3、附上迁移PHP5.6到PHP7指南一份:https://github.com/laruence/Migrating-from-PHP5.6.x-to-PHP7.0.x
- Magento在php7下速度测试
- 在centos下安装php7
- php7.0.0在windows下的安装
- php7在 windows环境下部署
- php7在windows下的安装
- 在MAMP下PHP7安装Redis扩展
- PHP7在thinkphp5下连接mysql
- 在centos7下编译安装php7
- 在mysql,apache下安装php7
- linux下测试硬盘速度
- Linux下读写速度测试
- Linux下读写速度测试
- magento -- 在magento下如何直接操作数据库
- magento -- 在magento下如何直接操作数据库
- 提升magento速度
- Magento速度优化
- 提高Magento运行速度
- 提升magento速度
- IOS 图片选择器
- Ubuntu 13 不能更新源
- PHP中将数据库中的数据显示在网页
- 【Android图片加载框架】制作自己的图片加载框架(一)
- 3D Touch开发之App 快速入口标签(快捷菜单)
- Magento在php7下速度测试
- Centos下防止ssh暴力破解密码的方法
- 打包上传,cannot verify client 3000
- 禁止百度移动搜索对网页进行转码的方法
- 深入解析Oracle字符集
- 正则表达式在iOS中的运用
- 算法【7】:冒泡排序
- (android:windowIsTranslucent)影响(android:windowAnimationStyle)Activity切换动画无效
- preg_match长字符串匹配失败问题