Closed flomonster closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 28.54%. Comparing base (
9f12cd4
) to head (5815ab3
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
LGTM
Why did you drop
try_join_all
? Is it incompatible with the transaction ?
A transaction can only apply to a single connection. Besides, the new testing utils makes it harder to test functions that open multiple connections. And an endpoint opening multiple connections can starve others.
I guess it's one of these reasons ¯_(ツ)_/¯
LGTM Why did you drop
try_join_all
? Is it incompatible with the transaction ?A transaction can only apply to a single connection. Besides, the new testing utils makes it harder to test functions that open multiple connections. And an endpoint opening multiple connections can starve others.
I guess it's one of these reasons ¯(ツ)/¯
In addition, there was a comment with the try_join_all
:
When creating a connection for each objet, it will a panic with 'Cannot access shared transaction state' in the database pool Just one connection fixes it, but partially* defeats the purpose of joining all the requests at the end
- AsyncPgConnection supports pipeling within one connection, but it won’t run parallel
What is done
layer_neutral_section
(fix #7663)layer_neutral_sign
layer_psl_sign
Profiling
Before
TOTAL: 19s
infra_object_track_section
in 2002msinfra_layer_track_section
in 900msinfra_object_signal
in 2490msinfra_layer_signal
in 409msinfra_object_speed_section
in 810msinfra_layer_speed_section
in 6319msinfra_object_detector
in 474msinfra_layer_detector
in 566msinfra_object_neutral_section
in 14msinfra_object_switch
in 260msinfra_layer_switch
in 321msinfra_object_extended_switch_type
in 0msinfra_object_buffer_stop
in 22msinfra_layer_buffer_stop
in 26msinfra_object_route
in 545msinfra_object_operational_point
in 896msinfra_layer_operational_point
in 281msinfra_object_electrification
in 24msinfra_layer_electrification
in 402mserrors
in 2753msAfter
TOTAL: 19s
infra_object_track_section
in 786ms 🚀infra_layer_track_section
in 877msinfra_object_signal
in 329ms 🚀infra_layer_signal
in 418msinfra_object_speed_section
in 1054msinfra_layer_speed_section
in 6596ms ⚠️ (We should try to reduce the number of speed sections)infra_object_detector
in 444msinfra_layer_detector
in 560msinfra_object_neutral_section
in 14msinfra_object_switch
in 230msinfra_layer_switch
in 303msinfra_object_extended_switch_type
in 0msinfra_object_buffer_stop
in 22msinfra_layer_buffer_stop
in 26msinfra_object_route
in 512msinfra_object_operational_point
in 90msinfra_layer_operational_point
in 276ms 🚀infra_object_electrification
in 24msinfra_layer_electrification
in 378mserrors
in 2647msNew:
search_signal
in 1707ms 🐢search_track
in 10mssearch_operational_point
in 314ms 🐢infra_layer_neutral_section
in 15msinfra_layer_psl_sign
in 174msinfra_layer_neutral_sign
in 52ms