-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
PERF: switch from axios
to fetch
#6647
Comments
I'd be fine with this, just implies testing and validating the new client. Specifically, the file/attachment upload endpoints have always been tricky with the auto-generated clients. |
I took a look at this and overall it's quite nice as it removes the need to do The trickiest thing is figuring out how to re-implement
So the only way to monitor progress of these large file transfers appears to be to drop down and use XHR directly for that API call rather than using the |
That might be a reasonable compromise. So far we have had to manually re-implement those endpoints to some extent anyways. Another option (maybe in the short term). Is to only use axios for those two requests and eventually substitute them out later. |
axios
to fetch
I migrated the CLI from the I filed oazapfts/oazapfts#571 as a feature request to ease the transition for APIs that use enums. We could still migrate without that, but it would require some more code changes. I also sent oazapfts/oazapfts#568 to reduce code size a bit, but that's not a blocker at all. For the most part, the migration should be pretty straightforward. We just need to replace |
The bug
The typescript-axios generator pulls in an extra dependency on
axios
. The typescript-fetch generator could avoid this by using the browser's built-infetch
method.Note that
fetch
is not supported in Internet Explorer (https://caniuse.com/fetch). I didn't see in the docs which browsers are supported, but I'm guessing IE is not a concern since it's a fairly recent appThe OS that Immich Server is running on
any
Version of Immich Server
any
Version of Immich Mobile App
any
Platform with the issue
Your docker-compose.yml content
n/a
Your .env content
Reproduction steps
Additional information
No response
The text was updated successfully, but these errors were encountered: