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

[kraken] Fix: Recursive display of line and routes #4128

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

kadhikari
Copy link
Contributor

@kadhikari kadhikari commented Oct 4, 2023

Before correction:

  • Lines are displayed with routes recursively depending on depth: for depth=3 line.routes[].line.routes[]
  • Routes are displayed with line recursively depending on depth: for depth=3 routes[].line.routes[].line
  • with depth = 0 line doesn't have Network.

After correction

  • Lines are displayed with routes not depending on depth: for depth=1, 2 and 3 line.routes[]
  • Routes are displayed with line not depending on depth: for depth=1, 2 and 3 routes[].line
  • Line will always have Network even with depth = 0.

For more details:

Comparison of response time for some request on my PC before and after the correction:

  • url_navitia/lines/rerc/lines?
    -> depth=1 : 12.5 ms -> 13.0 ms / 57.5 ko -> 57.5 ko
    -> depth=2 : 13.6 ms -> 12.7 ms / 80.4 ko -> 57.6 ko
    -> depth=3 : 70 ms -> 12.8 ms / 1.5 Mo -> 57.6 ko

  • url_navitia/lines/rerc/routes?
    -> depth=1 : 15 ms -> 14.6 ms / 69.6 ko -> 75.8 ko (Network added in route.line)
    -> depth=2 : 76.5 ms -> 18 ms / 1.4 Mo -> 94.8 ko
    -> depth=3 : 393 ms -> 340 ms / 5.9 Mo -> 4.1 Mo (No change is made on route.stop_point and its sub-objects)

@pbougue pbougue changed the title Fix: Recursive display of line and routes [kraken] Fix: Recursive display of line and routes Oct 5, 2023
@kadhikari kadhikari force-pushed the fix_recursive_display_of_line_and_routes branch from ec96aed to d3a9c76 Compare October 6, 2023 12:25
@kadhikari kadhikari requested a review from pbougue October 6, 2023 12:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

84.6% 84.6% Coverage
0.0% 0.0% Duplication

Copy link

@SGrenet SGrenet left a comment

Choose a reason for hiding this comment

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

Ok, perf test are useful

@kadhikari kadhikari merged commit 5a7d512 into dev Oct 10, 2023
@kadhikari kadhikari deleted the fix_recursive_display_of_line_and_routes branch October 10, 2023 14:48
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.

3 participants