login about faq

Hey, is there any way we can speed up the LOGIN, FETCH EMAILS, and SEND EMAIL process? It take at least 2-3 seconds per email, that is on 50mbps WiFi and not even on cellular.

Is there any tips to fasten all processes?

UPDATE:

CkoMessageSet *messageSet = [self Search:emailStatus bUid:YES]; //  Search ALL, UNSEEN or SEEN mail. We can choose to fetch UIDs or sequence numbers.
if (!messageSet) {
    // handle error
}

NSMutableArray *uidArray = [[NSMutableArray alloc] init];

int messageSetCount = [messageSet.Count intValue];
for (int i = 0; i < messageSetCount; i++) {
    [uidArray addObject:[messageSet GetId:[NSNumber numberWithInt:i]]];
}

//  Fetch single email per UID
NSUInteger uidArrayCount = [uidArray count];
for (int uid = 0; uid < uidArrayCount; uid++) {
    CkoEmail *email = [self FetchSingle:[NSNumber numberWithInt:[[uidArray objectAtIndex:uid] intValue]] bUid:YES];
    NSLog(@"  << GOT EMAIL >>");
}

2014-08-09 18:06:10.614 WeMail[8157:3607]   << GOT EMAIL >>
2014-08-09 18:06:11.911 WeMail[8157:3607]   << GOT EMAIL >>
2014-08-09 18:06:14.723 WeMail[8157:3607]   << GOT EMAIL >>
2014-08-09 18:06:17.764 WeMail[8157:3607]   << GOT EMAIL >>
2014-08-09 18:06:20.572 WeMail[8157:3607]   << GOT EMAIL >>

asked Jul 15 '14 at 13:18

emotality's gravatar image

emotality
462410

edited Aug 09 '14 at 10:25

If you post a code sample of what you are currently doing, it will give us a better chance of seeing where you could optimize your code. Right now, it would just be shooting in the dark.

(Jul 31 '14 at 07:43) jpbro ♦

Updated the code, it is exactly like in docs. Is anyone else experiencing this VERY SLOW service??

(Aug 09 '14 at 10:24) emotality

I just read the following on the IMAP component feature list: "Preview mail by retrieving message summaries." This will help displaying preview while the emails are being downloaded in the background. Is there a way to download ALL emails in that mailbox for preview?

(Aug 09 '14 at 10:53) emotality

The problem was that I was saving the whole email object as well and this wasted time, not a good idea! Also all the if statements and loops and info saving to NSDictionary. So Just check that your code is as fast as possible, leave debug logging at debug etc ;)

link

answered Sep 02 '14 at 17:04

emotality's gravatar image

emotality
462410

Thanks for coming back to share your experience and discovery. Hopefully it will be of some help to others in the future.

(Sep 02 '14 at 17:16) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×174
×94
×79
×60

Asked: Jul 15 '14 at 13:18

Seen: 1,772 times

Last updated: Sep 02 '14 at 17:16

powered by OSQA