Skip to content
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

Speedup stdcm editoast endpoint 🚀 #10692

Merged
merged 4 commits into from
Feb 7, 2025
Merged

Speedup stdcm editoast endpoint 🚀 #10692

merged 4 commits into from
Feb 7, 2025

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Feb 5, 2025

close #10452

What si done (review commits individual):

  1. Spawn tasks to dispatch cpu charge
  2. Reduce train batch size
  3. Avoid useless psql queries
  4. Optimize a postgresql queries. Limit the number of elements in the response. Moving a filter from rust to postgres. (check perf here: https://explain.dalibo.com/plan/e7d4427b7a8ea7d5)

Local benchmark

Before After
Without cache 106s 108s
With cache 9.64s 3.15s

Dev benchmark

Before (Compression) After (No-Compression) After (Compression)
Without cache 90s 111s 109s
With cache 17s 12.7s 8.3s

@flomonster flomonster changed the title Speedup stdcm editoast endpoint Speedup stdcm editoast endpoint 🚀 Feb 5, 2025
@github-actions github-actions bot added the area:editoast Work on Editoast Service label Feb 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.91%. Comparing base (14fa21b) to head (6d9e5f8).
Report is 5 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/models/timetable.rs 94.11% 1 Missing ⚠️
editoast/src/views/path/path_item_cache.rs 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10692   +/-   ##
=======================================
  Coverage   81.90%   81.91%           
=======================================
  Files        1079     1079           
  Lines      107473   107471    -2     
  Branches      734      734           
=======================================
+ Hits        88024    88032    +8     
+ Misses      19409    19399   -10     
  Partials       40       40           
Flag Coverage Δ
editoast 74.32% <95.65%> (+0.02%) ⬆️
front 89.41% <ø> (ø)
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flomonster flomonster force-pushed the fam/speedup-lmr branch 5 times, most recently from 246b71e to 193d4b6 Compare February 6, 2025 18:24
@flomonster flomonster marked this pull request as ready for review February 6, 2025 18:24
@flomonster flomonster requested a review from a team as a code owner February 6, 2025 18:24
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement of performance 🚀 Only minor comments.

- Limit the number of returned elements
- Move filter from rust to postgres

Benchmark: 3s -> 50ms

Signed-off-by: Florian Amsallem <[email protected]>
@flomonster flomonster enabled auto-merge February 7, 2025 11:23
@flomonster flomonster added this pull request to the merge queue Feb 7, 2025
Merged via the queue into dev with commit f73e9fd Feb 7, 2025
27 checks passed
@flomonster flomonster deleted the fam/speedup-lmr branch February 7, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STDCM queries take too much time
3 participants