Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
tosensei567644dbeen there, refactored that.
to be honest, on a "shocking"-scale of 1-10, this is just maybe 4 or 5 to me.
The other side of this:
Ok. We have a static 150kloc CSV file, that we want to be able to query randomly.
Is the data set updatable? no.
will any records be deleted? no.
Are the queris static? yes.
Are we going to do anything else with this in the next 5 years? no.
So CRUD, without the C, U or D?
Simple solution: memory resident sqlite database. memory footprint of 30mb. With a bit of sql written.
TL during Code Review: Why no ORM?
A few years ago I tried this in a fresh sandbox project with PHP:
- native SQL: 30ms
- ORM (same data): 300ms
We are ORMless btw :)
The problem I was highlighting wasn't ORM vs non-ORM; the problem I was highlighting was downloading the whole fucking db because you can't use a component in Angular.
As for ORMs, they are tools. You need to know when to hold them and when to fold them. You say PHP and, given the slowness, I take it you're using Eloquent, it's an Active Record (and a bad one at that too), so it's doomed to be slow. Data Mappers are much more reasonable and work fine for 99% of your use cases, really.
This makes me feel more confident, thank you
nururururu80743dDo you live in the first world? If so, I bet this person makes like ten times what I make.
ars1340843dWhy are these people team leads?