[imp] possible bug in getDelimiter?

Jim Ursetto jim@3e8.org
Mon, 29 Jul 2002 01:23:45 -0500


Hi,

I installed IMP today with UW-IMAPD (mbox format) and noticed that 
folder opening time increased dramatically whenever I specified a
value for "folders".  For example, at login time, it would take about 10
seconds to log in when just INBOX was present, but with folders set to
'mfolder/' the time tripled.  Also, my server hit the disk very hard.
I dumped the protocol exchange:

00000001 SELECT INBOX
00000002 LIST "" mfolder/*
00000003 LIST "" %

#3 seems problematic; it took 10 seconds.  #1 and #2 were near-instantaneous.
Looking at the code, directive #3 is issued from getDelimiter in
lib/Folder.php.  #3 does in fact return the hierarchy delimiter, but at
the very high cost of parsing my entire home directory.  #3 is not
issued when #2 returns an empty list, which explains the observed behavior.

I'm new to IMP, so I don't know the right way to solve this problem.
For now, I removed the call to imap_getmailboxes() in getDelimiter,
and hardcoded the delimiter to the default, '/'.  This provides a
substantial speedup on my ancient hardware.  I could speculate on
real solutions, but I think that's best left to the experts.
[Hopefully, I haven't missed a trivial configuration issue.]

Jim

-- 
"The FBI said al-Rabeei's aliases may include: Fawaz Yahia Hassan Aribii, 
Fawaz al-Rubai, Fawaz Yehia Hassan al-Rabie, Fawaz Yahya al-Rabi'i, Fawaz Yahya
al-Ribi (al-Ruba'i, al-Rabia'i, al-Rabi'i), Forqan al-Tajiki, Furgan al-Tajiki,
Furqan the Chechen, Faris al-Baraq, Sa'id, Musharraf, and Salem al-Frahan."
jim@3e8.org / 0x43340710 / 517B C658 D2CB 260D 3E1F  5ED1 6DB3 FBB9 4334 0710