8000 climbingTiles: use REST XATA in getClimbingTile() by zbycz · Pull Request #1128 · zbycz/osmapp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

climbingTiles: use REST XATA in getClimbingTile() #1128

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 2 commits into from
Jun 24, 2025
Merged

climbingTiles: use REST XATA in getClimbingTile() #1128

merged 2 commits into from
Jun 24, 2025

Conversation

zbycz
Copy link
Owner
@zbycz zbycz commented Jun 24, 2025

The get tile url was often hitting DB concurency limit. Using XATA REST endpoint should solve this. I was initially worried about the performance, but it looks ok.

eg http://localhost:3000/api/climbing-tiles/tile?z=6&x=33&y=22

The REST was not convenient for the tile 0/0/0 as fetching all 55k records by 1000 would be very many requests. But now the tile is cached during refresh (#1127), it is no longer an issue.

Test cases – comparison of old (pg) and new (rest)

Resolution: the rest version looks slightly faster, also there should not be any issue with concurency limit anymore.

tile records duration_old (pg) duration_rest test#1 duration_rest test#2
median   894 ms 428 ms 657 ms
avg   2154 ms 1646 ms 1304 ms
6/33/22 2,452 2,021 4,296 22,345
6/34/21 1,561 737 1,999 3,004
6/34/22 1,303 406 1,285 1,760
6/32/23 819 625 770 868
6/33/21 819 894 6000 657
6/33/23 733 1,641 6000 1,011
12/2210/1395 669 5,679 267 282
6/32/22 598 3,482 381 421
6/35/21 502 734 654 715
12/2220/1377 331 6,345 228 260
6/32/21 309 1,052 332 456
9/276/173 291 45 4,191 304
9/278/172 280 310 428 8,431
6/34/23 260 1,834 355 1,487
12/2120/1134 248 300 243 366
6/33/18 216 737 335 447
12/2209/1395 207 9,770 219 389
         
0/0/0 2,788 1,239 22422  

duration_rest test#1 – 0/0/0 – just for fun or as stress test, it is now cached during build, was requesting 34x rest, limit for such request is 30 secs

Copy link
vercel bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Jun 24, 2025 3:59pm

@zbycz zbycz merged commit 246e4d4 into master Jun 24, 2025
11 checks passed
@zbycz zbycz deleted the ct-rest branch June 24, 2025 16:25
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
0