-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV ?_stream=on redundantly calculates facets for every page #1349
Comments
Relevant code: datasette/datasette/views/base.py Lines 263 to 315 in 0a7621f
|
Related issue: #263 - "Facets should not execute for ?shape=array|object" |
It's not just facets, I think it's trying to execute suggested facets too! |
Now that I have datasette/datasette/views/base.py Lines 263 to 270 in 0a7621f
|
I think the right way to do this is to construct a new datasette/datasette/utils/asgi.py Lines 88 to 99 in c5ae119
|
Actually there is precedent for swapping out Lines 1117 to 1122 in c5ae119
|
I'm having a really hard time figuring out how to unit test this - ideally I'd monitor which SQL queries are executed using the tracing mechanism, but that's not set up to work with anything other than HTML or JSON outputs: Lines 125 to 134 in c5ae119
|
I think it's worth getting |
Fixed in d1d06ac |
I'm trying to figure out why a full CSV export from https://covid-19.datasettes.com/covid/ny_times_us_counties runs unbearably slowly.
It's because the streaming endpoint works by scrolling through every page, and it turns out every page calculates facets and suggested facets!
The text was updated successfully, but these errors were encountered: