Closed vincentsarago closed 2 years ago
test fails right now with FAILED tests/routes/test_tiles.py::test_function_tile - asyncpg.exceptions.DataError: invalid input for query argument $6: {} (expected str, got bytes)
which I think is related to https://github.com/developmentseed/timvt/blob/828768bc133d1c3bb1c5e63b2929d6006abaade5/timvt/db.py#L19-L26 and https://github.com/developmentseed/timvt/blob/828768bc133d1c3bb1c5e63b2929d6006abaade5/timvt/layer.py#L275-L283
FYI: There is a small impact on performance with this PR, we should wait before merging!
$ siege --file .github/workflows/data/urls_epsg4326.txt -b -c 20 -r 100 > /dev/null
** SIEGE 4.1.3
** Preparing 20 concurrent users for battle.
The server is now under siege...
Transactions: 2000 hits
Availability: 100.00 %
Elapsed time: 3.03 secs
Data transferred: 5.47 MB
Response time: 0.03 secs
Transaction rate: 660.07 trans/sec
Throughput: 1.81 MB/sec
Concurrency: 18.11
Successful transactions: 2000
Failed transactions: 0
Longest transaction: 0.08
Shortest transaction: 0.02
$ siege --file .github/workflows/data/urls_epsg4326.txt -b -c 20 -r 100 > /dev/null
** SIEGE 4.1.3
** Preparing 20 concurrent users for battle.
The server is now under siege...
Transactions: 2000 hits
Availability: 100.00 %
Elapsed time: 2.73 secs
Data transferred: 5.47 MB
Response time: 0.02 secs
Transaction rate: 732.60 trans/sec
Throughput: 2.00 MB/sec
Concurrency: 16.76
Successful transactions: 2000
Failed transactions: 0
Longest transaction: 0.09
Shortest transaction: 0.00
Update on performance, I've ran more benchmark locally and the difference is really small and still faster than pg_tileserv so I think we are 👍
👋 @bitner
This PR does:
==
the one intifeatures
breaking change
table_catalog
type toDict[str, Dict[str, Any]]
Table
class changesfunction_catalog
totimvt_function_catalog
to avoid collision with tifeatures function_catalogThis reuse code from
tifeatures
(not yet public) project.