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

feat: draft async get assets #934

Merged
merged 4 commits into from
Aug 23, 2024
Merged

feat: draft async get assets #934

merged 4 commits into from
Aug 23, 2024

Conversation

dfguerrerom
Copy link
Collaborator

@dfguerrerom dfguerrerom commented Aug 21, 2024

from the current recursive function implementation the time to load 100 assets stored in multiple folders, the time was:

####################### Recursive #######################
Execution time: 13.889884233474731 seconds

By using the suggested implementation we could improve the result by 80%.

####################### Async Concurrent 2 #######################
Execution time: 2.823052406311035 seconds

@dfguerrerom dfguerrerom linked an issue Aug 21, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.50%. Comparing base (8a347a5) to head (4ce5069).

Files Patch % Lines
sepal_ui/scripts/gee.py 90.24% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #934      +/-   ##
==========================================
- Coverage   96.64%   96.50%   -0.15%     
==========================================
  Files          39       39              
  Lines        3964     4003      +39     
==========================================
+ Hits         3831     3863      +32     
- Misses        133      140       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dfguerrerom dfguerrerom marked this pull request as ready for review August 23, 2024 13:24
@dfguerrerom
Copy link
Collaborator Author

It works but I don't want to dispatch threads to process the requests, I would like to create a fully asyncio call...

@dfguerrerom
Copy link
Collaborator Author

Adding max_concurrent_tasks parameter with a semaphore I think will be enough to be sure this feature won't cause any issue. I will merge this PR and later I will open a new one once dfguerrerom/ee-client#3 integrates this changes.

@dfguerrerom dfguerrerom merged commit 102b385 into main Aug 23, 2024
8 of 9 checks passed
@dfguerrerom dfguerrerom deleted the async_get_assets branch August 23, 2024 20:19
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.

asynchronously get assets from gee
2 participants