Reputation: 1584
I'm running this function for files that are about 1mb to load files to cache using Parse as a backend. I'm watching logging the progress to watch the file load. If the file loads from cache, it finishes instantly. When it isn't, sometimes it takes about .5 seconds to load, but then other times, for consistent time periods, it takes like 90 seconds to load.
// Load the image to cache
[message[@"file"] getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
}progressBlock:^(int percentDone) {
NSLog(@"PERCENT DONE %i",percentDone);
}];
Is this a limitation of Parse that I should expect as a standard load time for files on 1mb? I can't seem to pinpoint the cause of the dramatic variation in load times.
Upvotes: 1
Views: 812
Reputation: 3207
I faced this problem to load images from parse and took lot time's and the only reason is SIZE of the file. As I tried load small size file and it was much quicker than previous. So reduce size of file before saving to parse. Will help you out in quicker loading. Also @Logan if you cross your brust limit then all your request are rejected and it doesn't slow down loading process simply reject !!!
Upvotes: 2
Reputation: 131426
Downloading anything over the internet is sensitive to the state of your internet connection, se. iOS devices use WiFi or a cellular connection, which is subject to weak signals, radio interference, etc. However, even on a hard-wired connection, you sometimes get slow performance, timeouts, etc.
I'm guessing that's all it is.
Upvotes: 0