4 ms·
when you need to deal with extreme amount of data with a small latency that comes from the database than django is not that pleasent, at least not it's orm.
by merb 10y ago
when you need to deal with extreme amount of data with a small latency that comes from the database than django is not that pleasent, at least not it's orm.
- dom0 10y agoIt very much depends. The ORM in Django is one of the better ones, and very powerful. If it doesn't suffice it still offers query wrapping. Of course, if you need to process all 1 bazillion records in application code, then you're going to take a huge speed hit with any framework/ORM and language. Processing data at the storage site (the DB server) is simply very, very efficient. When lots of objects are loaded then annotations usually improve performance greatly, since they avoid the "for x in y: query_database" execution, instead executing a single query with allr equired data.
- merb 10y agowell reordering 1000 objects in scala/java is fast or doing map/flatmap/filter or put them into a map, however with django orm it's not. not a problem in python tough since when you directly use pg from python it retuns a iterator which is faster when you directly put everything correctly in your list. problem with django orm is that it copies it into a list structure etc. pp. (at least pre 1.4)
- falcolas 10y agoWell, you're probably going to be looking for something other than Python in the first place if latency is such a major issue. Python can be fast enough to handle most use cases, but really low latency is not one of its strengths.
- dom0 10y agoOften these requirements are exaggregated. "Real" low latency applications are far harder to write than just changing a language or framework. It would mean, for example, to forego any allocations in critical req-resp paths, or exactly bounded runtime of processing. Note how most software that is perceived to be "low latency" doesn't do any of that (eg. audio/video streaming)