Why i load image so slow from file storage?
file size is just 661.24KB
Please help me
10 Replies
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 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!
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?
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.
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
Some helpful bits in an SO answer: https://stackoverflow.com/a/29564247/1556245
Stack Overflow
Understanding Chrome network log "Stalled" state
I've a following network log in chrome:
I don't understand one thing in it: what's the difference between filled gray bars and transparent gray bars.
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 🥲
I'll try this on react native
@LoiLoi26 can confirm a 2.3mb image loads very quickly on device with expo / react native.
Question: how are you getting that network panel output? React devtools with expo has a network tab but it's barely functional, I can't get it to show anything for this image download.