Skip to content

fix: read each trip once when filtering schedules by stop and trip - #1117

Open
Ramdoys wants to merge 1 commit into
mbta:masterfrom
Ramdoys:schedule-filter-perf
Open

Ramdoys wants to merge 1 commit into
mbta:masterfrom
Ramdoys:schedule-filter-perf

Conversation

@Ramdoys

@Ramdoys Ramdoys commented Oct 25, 2026

Copy link
Copy Markdown

when you filter schedules by stop + route/trip, it used to do a separate mnesia lookup for every stop × trip combo. trip_id is the primary key though, so one read per trip already gets you every stop on it. now it reads each trip once and filters down to the requested stops after. some nice perf gains with this! i measured about 2 to 11x faster, depending on the type of query.

@Ramdoys
Ramdoys requested a review from a team as a code owner October 25, 2026 00:10
@Ramdoys
Ramdoys requested review from lemald and removed request for a team October 25, 2026 00:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant