


In Laravel 5.2, how much performance will be improved if DB facade is used instead of Eloquent ORM?
See the 2016 version of the Laravel series introductory tutorial (1) here is a paragraph:
Eloquent is Laravel’s ORM, and it is the most powerful place in the Laravel system, bar none. When the original Laravel author was developing the first version, it took a full third of the time to come up with Eloquent. Of course, "if you want to practice this skill, you must first go to the palace." Eloquent is also the slowest place in Laravel and cannot be solved so far. (Performance problems caused by routing, automatic loading, scattered configuration, and views are almost completely solved through caching)
Is this indeed the case? Can using cache (such as redis) solve Laravel's performance problems, except Eloquent ORM?
If you use the DB facade instead of Eloquent ORM, is there no need to create a Model? In other words, MVC has become VC?
Reply content:
See the 2016 version of the Laravel series introductory tutorial (1) here is a paragraph:
Eloquent is Laravel’s ORM, and it is the most powerful place in the Laravel system, bar none. When the original Laravel author was developing the first version, it took a full third of the time to come up with Eloquent. Of course, "if you want to practice this skill, you must first go to the palace." Eloquent is also the slowest place in Laravel and cannot be solved so far. (Performance problems caused by routing, automatic loading, scattered configuration, and views are almost completely solved through caching)
Is this indeed the case? Can using cache (such as redis) solve Laravel's performance problems, except Eloquent ORM?
If you use the DB facade instead of Eloquent ORM, is there no need to create a Model? In other words, MVC has become VC?
First of all, I have to complain. Many documents of Laravel
like to overextend. For example, in the paragraph above, Eloquent
and PHP
in other ORM
frameworks all have a similar flavor, and there is nothing particularly awesome about it. In addition, it does take a lot of time to develop ORM
, mainly because the logic in ORM
is much more complicated than other components, but you can’t say how long it takes to make a difference...
Secondly, ORM
is not equal to Model
, you can still do ORM
without Model
. For example, my framework Beaver
(https://github.com/funcuter/beaver) is designed with Model
, but it has not been installed yet. (As mentioned above, ORM
is easy to use, but its performance is poor. I am disgusted by things with poor performance). In my design, ORM
directly operates Model
, bypassing the DB
layer, and normal operation can still be achieved. ORM
Model is more like a SQL query set of modules that you split out. So if you understand it this way, it is actually your choice whether to use M, just like in the early days, SQL statements were written directly on the page. If you care about performance so much, you can also directly use DB to execute native SQL as mentioned above.
The design ideas that will not improve Laravel are destined to be synonymous with low performance. This is purely to prove that PHP can actually use design patterns. In fact, the performance is at the bottom, and the performance is at the same level as zf. In fact, in terms of design patterns, zf is better Be stronger
Not taking sides or showing off, just discussing technical issues

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

The following resources contain additional information on CakePHP. Please use them to get more in-depth knowledge on this.
