Laravel's speed and performance are so bad, can it be used?

Source: Internet
Author: User
Tags php framework
laravel5.1 an empty project, or a linked database, takes a few records of a table to show:
With Ab-t 10-c http://127.0.0.1/laravel511/public/index.php
or ab-n100-c100 http://127.0.0.1/laravel511/public/index.php
Results from request per time: <50

And if you change slim3 or CI3 test, you can reach Reququest per time:200-300

If no frame is used, the same test can be achieved: request per time:1300

Do not understand such a situation, but also to use the framework, the project on the framework of the case can be so low ah.

Bright white blind machine hardware AH.

Reply content:

laravel5.1 an empty project, or a linked database, takes a few records of a table to show:
With Ab-t 10-c http://127.0.0.1/laravel511/public/index.php
or ab-n100-c100 http://127.0.0.1/laravel511/public/index.php
Results from request per time: <50

And if you change slim3 or CI3 test, you can reach Reququest per time:200-300

If no frame is used, the same test can be achieved: request per time:1300

Do not understand such a situation, but also to use the framework, the project on the framework of the case can be so low ah.

Bright white blind machine hardware AH.

Don't know what to do with routing?
http://www.oschina.net/search?q=%E8%B7%AF%E7%94%B1&scope=project&tag1=0&tag2=0&lang=22&os= 0

A truck with a capacity of 40 tons ran at 80 mph on the highway.
Next to a Ferrari 250 speed flew over,
Said to the truck: Hey, big fat, why are you so slow?

Then the earth still turns, or someone drives a truck, someone drives a Ferrari ...

================= The following is the update content =========================

======= Update ======== again

Delete the previous content, and do not participate in such a matter in the future. Thanks for thanking

@lanffy

Larval this framework starts loading the class file more, his speed is really slow, so you have to open the PHP opcache, and then you can happily use this thing.

Opcache improves PHP performance by storing PHP script precompiled bytecode in shared memory, and the benefit of storing precompiled bytecode is to eliminate the overhead of loading and parsing PHP scripts every time.
The Opcache extension has been bundled in PHP 5.5.0 and later. For PHP 5.2,5.3 and version 5.4, you can use the Opcache library in the» PECL extension.

http://php.net/manual/zh/intro.opcache.php

    • The framework is the tool, 工具重点就是在于适用和顺手 you can use the other, or strong enough to write your own;

    • But the comprehensive factor makes the laravel world's most popular PHP framework always has its reason, or must first learn to use as well, after all, development or team collaboration;

    • Any application also cannot be a page function can carry out, your this kind of test actually meaningless, an empty project, it wants to add a lot of content, think about if when this project is big enough, the gap between the framework's limitations will become very small, but the different framework brings the project difficulty controllability will be a lot of difference , and is not rich in the expansion to achieve rapid development, time is money, just laravel have a lot of expansion, and usage has been well encapsulated, familiar with will be used very handy;

    • Only the flexible application tool will play the role of the tool, the actual development can not only because of such a few hundred milliseconds to determine the life and death of a tool;

    • There's a lot of it in the country. asp

    • Come on.

My two projects are Laraven do, two projects every day IP10 around, two servers configured for a 16-core 32g, a 8-core 16g, now use top view load is 80+ continue to add machine is impossible, now intestines are regret green. I knew this B-like was born.

A road can run 1000 bikes, maybe only 100 cars.

It's really slow, I've measured it, so I don't have to.

Laravel simple AH. Iteration products can be updated quickly. (native PHP to write how many lines, Laravel 10 lines can be completed)

Do you have so many users? Need to consider performance issues? Besides, performance problems can be solved by machine configuration and quantity.

If you're bigger, you can use other frameworks Yaf, Phalcon, Java, etc.

Performance is the laravel of life and death, avoid can not avoid.
Need a high-performance framework, you can try bird Brother with pure C fame YAF:
YAF is a PHP framework similar to Zend framework, which are written in C and built as PHP extension.
http://php.net/manual/zh/book.yaf.php
Http://pecl.php.net/package/yaf

Performance, YII2.0 ci3.0 This is a lighter frame, you can try, other more high-performance words, Palphon, yaf very good

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.