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: use ehttp instead of reqwest/tokio #6

Merged
merged 1 commit into from
May 19, 2024

Conversation

hiratara
Copy link
Contributor

Hello,

I noticed that bevy_slippy_tiles uses a blocking API, which sometimes slows down my task pool. This PR replaces the reqwest crate with the ehttp crate to retrieve tiles asynchronously. I attempted to use reqwest for asynchronous operations, but it was too challenging due to tokio dependencies.

Please note that while ehttp supports WASM, this change does not include WASM support because we use multithreaded task pools and local file systems.

Copy link
Owner

@edouardpoitras edouardpoitras left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@edouardpoitras edouardpoitras merged commit 1370cec into edouardpoitras:main May 19, 2024
3 checks passed
@hiratara
Copy link
Contributor Author

Note that there are some discussions about which client we should use with IoTaskPool. ehttp may not be the best option, but I believe it is a good starting point.

bevyengine/bevy#6903

ehttp uses ureq on native, which has blocking I/O underneath and requires spawning a new thread for each request.

bevyengine/bevy#11694

@hiratara hiratara deleted the async-http branch May 30, 2024 22:55
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.

2 participants