Skip to content

core: stdcm: cache engineering allowance sequences #12586

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

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

eckter
Copy link
Contributor

@eckter eckter commented Jul 23, 2025

We very often test several engineering allowances at the same place, with the same previous edges. This is done when we can get overtaken by more than one train at once at the same place, which is actually very common.

Caching the sequences avoids redundant computations. We still only evaluate what's necessary, and then use soft references to avoid ram issues.

Full bench data, +3% average peak ram, -25% processing time. Run with 6 GB limit.

time_old time_per_knode_old time_new time_per_knode_new time_diff
count 88.000000 88.000000 88.000000 88.000000 88.000000
mean 6.955023 0.706642 5.180443 0.648656 -1.774580
std 14.103137 1.221101 9.960951 1.190449 4.376797
min 0.100000 0.038378 0.098000 0.037140 -27.682000
25% 0.920000 0.224366 0.902250 0.163905 -1.260750
50% 2.997000 0.321516 2.577500 0.269849 -0.373500
75% 6.156500 0.511772 5.032000 0.448302 -0.037500
max 99.435000 6.894737 73.056000 6.631579 0.067000
mb_old mb_new mb_diff
count 88.000000 88.000000 88.000000
mean 3257.806818 3350.636364 92.829545
std 963.730168 858.745117 705.095122
min 1333.000000 1333.000000 -1851.000000
25% 2426.500000 2668.750000 -301.250000
50% 3080.000000 3332.500000 50.000000
75% 3960.250000 3917.750000 492.000000
max 5195.000000 5339.000000 2012.000000

@github-actions github-actions bot added the area:core Work on Core Service label Jul 23, 2025
@eckter eckter force-pushed the ech/cache-engineering-sequences branch from b7edb30 to c26e8db Compare July 23, 2025 12:54
@eckter eckter moved this to In Progress in Board PI 16 Jul 24, 2025
@eckter eckter self-assigned this Jul 24, 2025
@eckter eckter force-pushed the ech/cache-engineering-sequences branch 2 times, most recently from e6a7387 to 09ccc78 Compare July 24, 2025 13:03
@eckter eckter marked this pull request as ready for review July 24, 2025 13:49
@eckter eckter requested a review from a team as a code owner July 24, 2025 13:49
@eckter eckter requested review from Khoyo and Erashin July 24, 2025 13:49
@eckter eckter force-pushed the ech/cache-engineering-sequences branch 2 times, most recently from fbeeb2b to 97e8c8d Compare July 24, 2025 13:54
@eckter eckter removed the request for review from Khoyo July 24, 2025 14:02
@eckter eckter force-pushed the ech/cache-engineering-sequences branch from 97e8c8d to 0644555 Compare July 24, 2025 14:03
@eckter eckter enabled auto-merge July 24, 2025 14:11
@eckter eckter moved this from In Progress to Awaiting merge in Board PI 16 Jul 24, 2025
Copy link
Contributor

@Erashin Erashin left a comment

Choose a reason for hiding this comment

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

We'll have to check if other parts of the code can implement this. Gj! :)

@eckter eckter added this pull request to the merge queue Jul 28, 2025
Merged via the queue into dev with commit 8ec20d0 Jul 28, 2025
27 checks passed
@eckter eckter deleted the ech/cache-engineering-sequences branch July 28, 2025 08:43
@github-project-automation github-project-automation bot moved this from Awaiting merge to Done in Board PI 16 Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core Work on Core Service
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants