search
HomePHP FrameworkLaravelA brief analysis of the performance comparison of laravel, lumen and tp frameworks

Each framework has its own advantages and disadvantages. Laravel is relatively bloated, but it integrates many functions, such as the complete Artisan command line, ORM model, observer, listener, easy-to-use di container to implement dependency injection, etc. There are also many ecological extensions.

For tp, I only used the tp3.2 version at the earliest, and later I only had some understanding of tp5. Recently I discovered that tp6 has been released, and it is more similar to laravel. It has also developed the think command line and ORM model, and even the usage of ORM is similar. Didn't look at the others in detail.

Because I have always known that the disadvantage of laravel is that its performance is slower because it loads more things, so how much slower is it? Here is a simple test to see.

Comparison

The three frameworks for comparison are:

  • laravel

  • tp

  • lumen

100,000 pieces of data have been inserted into the database in advance. Take a look at the performance comparison of the top ten items.

laravel7

Let’s take a look at the running results of the laravel framework.

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

#You can see that the average is about 150- 160ms. In fact, I measured it many times. I just took a few screenshots. If you are interested, you can test it and I will correct it if I am wrong hahaha.

lumen

Let’s take a look at lumen. As a lightweight laravel, lumen has deleted many functions. It is indeed much faster.

Because Lumen removes the ORM by default, you need to uncomment the ORM in the bootstrap/app.php startup file.

$app->withEloquent();

Okay, let’s take a look at the results.

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

It can be seen that the average time consuming of lumen is about 80ms, compared with laravel Nearly double the performance.

tp6

tp6 test results.

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

A brief analysis of the performance comparison of laravel, lumen and tp frameworks

You can see that the average time consumption of tp6 is about 100ms, which is faster than laravel, but Slower than lumen.

The test results for the three frameworks are roughly like this. It is just a simple test. If there are tests for other frameworks, please @me or send them to me and I will make up for them.

Because the test results are the results of hand testing rather than pressure testing, the test results are for reference only.

Basically it can be seen that the minimum time consumption of laravel is about 130, the maximum time is about 200, and the average time is 160.

tp6 has a minimum of around 80, a maximum of around 120, and an average of around 100.

lumen has a minimum of around 50, a maximum of around 100, and an average of around 80.

But I believe that when the business becomes larger and more complex and various functions need to be introduced, even using tp or lumen will take more time and require a longer development cycle. Of course, if the business is simple, it can be completed using a simple framework.

【Related recommendations:

laravel video tutorial, thinkphp framework

The above is the detailed content of A brief analysis of the performance comparison of laravel, lumen and tp frameworks. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:爱代码爱编程. If there is any infringement, please contact admin@php.cn delete
Task Management Tools: Prioritizing and Tracking Progress in Remote ProjectsTask Management Tools: Prioritizing and Tracking Progress in Remote ProjectsMay 02, 2025 am 12:25 AM

Taskmanagementtoolsareessentialforeffectiveremoteprojectmanagementbyprioritizingtasksandtrackingprogress.1)UsetoolslikeTrelloandAsanatosetprioritieswithlabelsortags.2)EmploytoolslikeJiraandMonday.comforvisualtrackingwithGanttchartsandprogressbars.3)K

How does the latest Laravel version improve performance?How does the latest Laravel version improve performance?May 02, 2025 am 12:24 AM

Laravel10enhancesperformancethroughseveralkeyfeatures.1)Itintroducesquerybuildercachingtoreducedatabaseload.2)ItoptimizesEloquentmodelloadingwithlazyloadingproxies.3)Itimprovesroutingwithanewcachingsystem.4)ItenhancesBladetemplatingwithviewcaching,al

Deployment Strategies for Full-Stack Laravel ApplicationsDeployment Strategies for Full-Stack Laravel ApplicationsMay 02, 2025 am 12:22 AM

The best full-stack Laravel application deployment strategies include: 1. Zero downtime deployment, 2. Blue-green deployment, 3. Continuous deployment, and 4. Canary release. 1. Zero downtime deployment uses Envoy or Deployer to automate the deployment process to ensure that applications remain available when updated. 2. Blue and green deployment enables downtime deployment by maintaining two environments and allows for rapid rollback. 3. Continuous deployment Automate the entire deployment process through GitHubActions or GitLabCI/CD. 4. Canary releases through Nginx configuration, gradually promoting the new version to users to ensure performance optimization and rapid rollback.

Scaling a Full-Stack Laravel Application: Best Practices and TechniquesScaling a Full-Stack Laravel Application: Best Practices and TechniquesMay 02, 2025 am 12:22 AM

ToscaleaLaravelapplicationeffectively,focusondatabasesharding,caching,loadbalancing,andmicroservices.1)Implementdatabaseshardingtodistributedataacrossmultipledatabasesforimprovedperformance.2)UseLaravel'scachingsystemwithRedisorMemcachedtoreducedatab

The Silent Struggle: Overcoming Communication Barriers in Distributed TeamsThe Silent Struggle: Overcoming Communication Barriers in Distributed TeamsMay 02, 2025 am 12:20 AM

Toovercomecommunicationbarriersindistributedteams,use:1)videocallsforface-to-faceinteraction,2)setclearresponsetimeexpectations,3)chooseappropriatecommunicationtools,4)createateamcommunicationguide,and5)establishpersonalboundariestopreventburnout.The

Using Laravel Blade for Frontend Templating in Full-Stack ProjectsUsing Laravel Blade for Frontend Templating in Full-Stack ProjectsMay 01, 2025 am 12:24 AM

LaravelBladeenhancesfrontendtemplatinginfull-stackprojectsbyofferingcleansyntaxandpowerfulfeatures.1)Itallowsforeasyvariabledisplayandcontrolstructures.2)Bladesupportscreatingandreusingcomponents,aidinginmanagingcomplexUIs.3)Itefficientlyhandleslayou

Building a Full-Stack Application with Laravel: A Practical TutorialBuilding a Full-Stack Application with Laravel: A Practical TutorialMay 01, 2025 am 12:23 AM

Laravelisidealforfull-stackapplicationsduetoitselegantsyntax,comprehensiveecosystem,andpowerfulfeatures.1)UseEloquentORMforintuitivebackenddatamanipulation,butavoidN 1queryissues.2)EmployBladetemplatingforcleanfrontendviews,beingcautiousofoverusing@i

What kind of tools did you use for the remote role to stay connected?What kind of tools did you use for the remote role to stay connected?May 01, 2025 am 12:21 AM

Forremotework,IuseZoomforvideocalls,Slackformessaging,Trelloforprojectmanagement,andGitHubforcodecollaboration.1)Zoomisreliableforlargemeetingsbuthastimelimitsonthefreeversion.2)Slackintegrateswellwithothertoolsbutcanleadtonotificationoverload.3)Trel

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment