Skip to content

Not-great performance for paged OData access of repeatgroup items #1621

@brontolosone

Description

@brontolosone

Potentially related: #1618

Follow along:

(if you want to run it yourself on the same data, grab your session token from the staging DB)

export CENTRAL_TOKEN="your-session-token-for-staging-here"

First, as a baseline of sorts, timing the retrieval of a single submission via OData (10 times):

for i in `seq 10`; do /usr/bin/time --format=%e curl --compressed --silent --show-error -H 'Accept: application/json, text/plain, */*' -H "Authorization: Bearer ${CENTRAL_TOKEN}" 'https://staging.getodk.cloud/v1/projects/112/forms/geotest.svc/Submissions?$top=1' > /dev/null; sleep 1; done
1.25
1.33
1.20
1.19
1.15
1.14
1.38
1.17
1.21
1.31

Not very fast, to start with.
Now, let's time the retrieval of the first repeatgroup item (plural "table") (10 times):

for i in `seq 10`; do /usr/bin/time --format=%e curl --compressed --silent --show-error -H 'Accept: application/json, text/plain, */*' -H "Authorization: Bearer ${CENTRAL_TOKEN}" 'https://staging.getodk.cloud/v1/projects/112/forms/geotest.svc/Submissions.plural?$top=1' > /dev/null; sleep 1; done
26.25
24.49
29.20
29.59
56.63
52.78
35.49
25.65
37.24
68.52

Not great! Mind the response body size is just 902 bytes. My intuition is that there's something suboptimal going on here 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendRequires a change to the API serverperformancePerformance, benchmarking

    Type

    Projects

    Status

    🕒 backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions