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

Performance improvement to loadTiles #6

Closed
wants to merge 1 commit into from

Conversation

spyke555
Copy link

@spyke555 spyke555 commented Jun 3, 2021

Added the following to the loadTiles function:

  • Create an http.client prior to looping through the downloading of the tiles
  • Within the loop, get the tile data using the client
  • Close the client at the end of the download loop

This avoids the opening and closing of a client connection for each tile request, improves performance at the end user level and is easier on the server side as we won't be slamming the server with hundereds / thousands of new connection requests.

Added the following to the loadTiles function:

  - Create an http.client prior to looping through the downloading of the tiles
  - Within the loop, get the tile data using the client
  - Close the client at the end of the download loop

This avoids the opening and closing of a client connection for each tile request, improves performance at the end user level and is easier on the server side as we won't be slamming the server with hundereds / thousands of new connection requests.
@spyke555
Copy link
Author

spyke555 commented Jun 3, 2021

This made a pretty big difference in performance in my use case since I am using a server that requires authentication. By keeping the connection open this allows all the tiles to be downloaded using the same connection, so only one authentication request required per area downloaded.

@spyke555 spyke555 changed the base branch from main to v3-testing June 3, 2021 12:15
@spyke555 spyke555 closed this Jun 3, 2021
@spyke555
Copy link
Author

spyke555 commented Jun 3, 2021

Made this one against master, will re-submit against V3.0.0

@JaffaKetchup JaffaKetchup added won't fix This issue will not be resolved duplicate This issue already exists labels Jun 3, 2021
@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Jun 3, 2021

Please see #7 for further information.

Repository owner locked and limited conversation to collaborators Jun 3, 2021
@spyke555 spyke555 deleted the patch-1 branch June 3, 2021 16:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue already exists won't fix This issue will not be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants