In this line...
|
return row.tobytes() if row else b"" |
the entire MVT response from PostGIS is converted to a bytes object. That means it has to be in memory twice, once as a memoryview and once as a bytes. I'm wondering if this is necessary, since Django performs the same conversion. If the conversion were not there, a caller could intercept the memoryview and make a StreamingHttpResponse out of it, so that it only needs to be in memory once.
In this line...
django-vectortiles/vectortiles/postgis/mixins.py
Line 58 in 86f0087
the entire MVT response from PostGIS is converted to a
bytesobject. That means it has to be in memory twice, once as amemoryviewand once as abytes. I'm wondering if this is necessary, since Django performs the same conversion. If the conversion were not there, a caller could intercept thememoryviewand make aStreamingHttpResponseout of it, so that it only needs to be in memory once.