4 ms·
How I learned to stop worrying and write my own ORM
- deleted 16y ago[deleted]
- Osiris 16y agoI find it interesting that with all the frameworks that Microsoft builds that they (seem) to spend so little time on optimizing the code. An interesting example is how the Entity Framework is actually slower than LINQ-to-SQL, which came before it. It's bizarre that they'd design EF to not reuse the same DB connection for multiple queries, or to cache the output of dynamically generated methods.
- iam 16y agoIt's hard to foresee which parts of the framework will need optimizing, it's not like they go and build a website with stackoverflow level of performance requirements as part of the development process.
- dazzawazza 16y agoRemember that the VAST majority of people using the MS stack will never have any performance problems. Most websites see very little traffic. It's not in MS interest to spend too much time optimising for these niche cases. That's time NOT spent adding features to attract more paying customers. It's better to optimise for revenue. I'm not saying MS doesn't care about performance, of course they do. I'm also not saying the stack is poor. You just have to see it though the lens of their business model.
- mwsherman 16y agoAdding layers of abstraction, on any platform, is generally guaranteed to be slower. Ruby and PHP are 10x slower than compiled C# and Java, for example. The "performance" is transferred to the developer by creating higher level frameworks. Because these frameworks have to be general, they can't optimize for every use case.
- lucisferre 16y agoThat may be true, but in web-over-data scenarios architectural design issues are going to trump language choice almost every time. Node.js is a somewhat decent example of this principle at work.
- lucisferre 16y agoSigh, once again we see the sad and sorry state of open source adoption in .NET. The choice seems to be to first have a taste of the swill Microsoft makes available and then fall back to the NIH philosophy when that doesn't cut it. Of note here, is that nHibernate, one of the strongest ORMs for .NET (and basically what EF is attempting to copy features from) was not even mentioned or considered. It's this whole "but there's open source in there, it might touch me" attitude I find ridiculous. Obviously I'm making assumptions here, but any discussion of ORM in .NET that doesn't even bring up nHibernate is suspect to me.