login about faq

I've been experiencing some (very) slow IMAP fetching. I just created a single file (with hardcoded details inside);

  • Load Chilkat library
  • Connect to server
  • Login
  • Select mailbox

then I tried to FetchSingleHeader('1', true); // UID = 1 and fetching by UID. It appeared it was slower than FetchSingle('1', true); while this should be (alot) slower then just fetching the headers?

$totalHeaders = microtime(true);
for($i = 1; $i <= 100; $i++)
{
    $email = $imap->FetchSingleHeader($uid, true);
}
echo (microtime(true) - $totalHeaders); // 354 seconds

$totalFullEmail = microtime(true);
for($i = 1; $i <= 100; $i++)
{
    $email = $imap->FetchSingle($uid, true);
}
echo (microtime(true) - $totalFullEmail); // 256 seconds

// edit - see blow I've been trying to find a difference in the code or what I'm doing wrong here. When I do $email->Subject(); it return exactly the same subject in both fetches (fetchSingleHeader and fetchSingle). But when I do $email->get_Size(); the fetchSingleHeaders return a BIGGER value from exactly the same email?

asked Sep 06 '13 at 07:30

flo's gravatar image

flo
1335

edited Sep 06 '13 at 11:37

Be the first one to answer this question!
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:

×174
×98
×35

Asked: Sep 06 '13 at 07:30

Seen: 1,155 times

Last updated: Sep 06 '13 at 11:37

powered by OSQA