Skip to content

Conversation

@varun2948
Copy link
Contributor

@varun2948 varun2948 commented Jan 17, 2024

What does this PR do ?

  • Enhances download logic for exports

Consideration

  • On previous approach , We cached file into browser letting user save exports from cache. This approach introduced bottleneck on devices with low RAM . Execution time for function also elevated long as logic waits for file to be downloaded in cache
  • Current approach : We make use of HEAD call instead of GET to know the status code of exports . This includes redirect user to original download link instead of storing in browser cache !

How to test ?

  • Try downloading exports from projects page . You should observe quicker function execution time !

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kshitijrajsharma kshitijrajsharma changed the title feat: reafactored the downloading code for quick download Enhance : Download link for Exports Jan 18, 2024
@kshitijrajsharma kshitijrajsharma merged commit 415ac65 into hotosm:develop Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants