Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Yes, the speed drops if you use it everywhere. Because a bold class is initialized for each entry.
Depends on ORM. Of course, there will be an overhead in terms of performance, especially if you take things like Doctrine with hydration, etc. But the profit in terms of development time and product quality that they give is more than worth all the costs. If the project becomes popular and +30% is an extra rack of servers, that is, paying for servers is already becoming more expensive than for a developer, then it already makes sense to refactor and optimize bottlenecks. But premature optimizations are evil.
As for SQL and DBMS capabilities - Doctrine and many others allow you to use both native queries (+ your own hydrations) and add some of your functions for *QL. Also, many things can be decently accelerated (in the doctrine, the bottleneck is the unit-of-work, or rather, the calculation of the differential of the data that is spinning there. By default, everything is compared head-on there, such as checking, but you can install your own implementation for your entities if you want it).
no, it doesn’t turn into sqllite
, you can use portable features
, the speed drops because the orm is not able to smoothly translate your complex queries into optimal ones for subds
+ many queries simply cannot be implemented in subds
+ you can’t use features specific only to this subd in the orm
Like any code, an ORM carries logic. Executing this logic eats up memory and CPU time. Failure - no (always yours, KO).
The question is different - will you write the tasks for which you are going to use the ORM, also optimally, as written in the well-known ORMs? Maybe ORM is not needed in this case, and you can get by with direct communication with the DBMS driver (if you doubt the appropriateness of using it).
And here they correctly note that modern ORMs can be finely tuned, so if you have a large project, such libraries will help you a lot.
Does ORM slow you down?
Of course it falls. But it all depends on the ORM.
If performance is important, then the best solution would be to use a microORM like Dapper or PetaPOCO. In fact, they only allow you to execute queries and quickly map objects. Dapper is good at this. The StackOverflow site is fully powered by it. But in this case, there are no "big" ORM goodies like state support and LINQ-to-SQL.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question