#Why i load image so slow from file storage?

1 messages · Page 1 of 1 (latest)

wise blaze
#

file size is just 661.24KB

Please help me

median notchBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

    - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
    - Use [search.convex.dev](https://search.convex.dev) to search Docs, Stack, and Discord all at once.
    - Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
    - Avoid tagging staff unless specifically instructed.

    Thank you!
vivid fog
#

Welcome! A few clarifying questions:

  • Confirming the obvious: you're using Convex Storage right?
  • Are you serving via url (from a query) or from an httpAction?
  • How long is the file taking to load?
  • Can you confirm your download speed using a test site like fast.com?
wise blaze
#

export const getImgUrlByStorageId = mutation({
args: {
storageId: v.string(),
},
handler: async (ctx, args) => {
return await ctx.storage.getUrl(args.storageId);
},
});

#

It took me almost 50 seconds for one photo.

vivid fog
#

Wow that's unexpected. Is it doing that on further requests or was that a one off?

#

For reference this is a 2.3mb image I just downloaded from convex storage

#

oh your time is all spent under "stalled" - that's time before the request could actually be sent

wise blaze
#

i using react native

I just found out when i run on IOS simulator it just take 1 second but run on my real device it take 50 second 🥲

vivid fog
#

I'll try this on react native

vivid fog
#

@wise blaze can confirm a 2.3mb image loads very quickly on device with expo / react native.