6.0.0-alpha12
6/12/25

[#8196] Dimp folder list never shows up when there is many (>1000) folders
Summary Dimp folder list never shows up when there is many (>1000) folders
Queue DIMP
Queue Version 1.1.2
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester clement.hermann (at) businessdecision (dot) com
Created 04/16/2009 (5901 days ago)
Due
Updated 04/17/2009 (5900 days ago)
Assigned 04/16/2009 (5901 days ago)
Resolved 04/17/2009 (5900 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/17/2009 07:20:58 PM Michael Slusarz Comment #4
State ⇒ Not A Bug
Reply to this comment
In Dimp, there is no way to work with only some folders (say,
personal folder and no shared / other user namespace) and access the
other folders in a more static way like in Imp.
Correct - this is by design.
In this case, there are shared folders with customer informations (a
customer = a folder). They are nested (no more than 100 at a given
level, so if it where possible to request and display only the top
folders it would be ok.

I'm not that experienced in web programming (especially json, ajax
etc), but isn't there a way to ask IMP the top folders list only, and
to refresh the list only when a subfolder is requested ?
Technically this is possible, but it adds a bunch of complexity, 
provides for a much slower UI (certain IMAP servers are notoriously 
slow at returning mailbox lists), and for the 99.9% of people without 
1000's of folders, it is not needed.



I optimized a few things in IMP 5 in the last few days to cut down on 
the JSON data size.  JSON data size is one of the areas that might 
cause a slowdown - older browsers can take a long time to parse a long 
JSON string.  But even with 1000's of folders the JSON data size is 
only 70-100KB.  And upcoming browsers will have json parsing support 
built-in so this will become less of an issue going forward.



The more important issue has to do with javascript event handling.  In 
DIMP 1.x, each folder inserted into the DOM required at least 1 event 
handler to be attached (others were attached on the first mouseover).   
Thus, inserting 1500 folders into the DOM required 2000+ event 
handlers.  This is not a great thing and I guarantee older browsers 
would probably be sluggish simply because of this issue.  The dimp 
interface in IMP 5 has already had its event model rewritten.  Now, 
even after inserting 1500 folders, the dimp screen only has 7 total 
event handlers registered.  This alone should fix any problems with 
display.



FWIW, I can display 1500 folders just fine on DIMP 1.x, albeit with a 
bit of a lag during loading (I am using a reasonably fast Dual Core 
machine running FF 3).  With the improvements mentioned above that 
have already been implemented in IMP 5, I don't think there is much 
more we need to do going forward - squeezing out even more performance 
for those .1% of people who have thousands of mailboxes simply isn't 
worth it.
I know there is a hook to hide shared folders, but when using it, is
there a way to access hidden folders (other than going to imp) ?
Also, would this be a setting that could be changed for some users
only ?
I assume you are talking about IMAP subscriptions and, at the moment, 
there is no support for this in dimp (although it is on the TODO list).
04/17/2009 07:57:33 AM clement (dot) hermann (at) businessdecision (dot) com Comment #3 Reply to this comment

[Show Quoted Text - 16 lines]
I agree, there should be a limit., but this is confusing for the user.



In Dimp, there is no way to work with only some folders (say, personal 
folder and no shared / other user namespace) and access the other 
folders in a more static way like in Imp.



In this case, there are shared folders with customer informations (a 
customer = a folder). They are nested (no more than 100 at a given 
level, so if it where possible to request and display only the top 
folders it would be ok.



I'm not that experienced in web programming (especially json, ajax 
etc), but isn't there a way to ask IMP the top folders list only, and 
to refresh the list only when a subfolder is requested ?



I know there is a hook to hide shared folders, but when using it, is 
there a way to access hidden folders (other than going to imp) ? Also, 
would this be a setting that could be changed for some users only ?





Regards,



Clément Hermann
04/16/2009 08:12:07 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Why do you have >1000 folders?  This is what IMAP subscriptions are 
for.  This would probably be an issue, since not only do you have to 
process the JSON return with all this data, but you have to insert all 
those DOM elements into the page - which is a significant browser 
slowdown.



In IMP it is not an issue because we don't need to load the entire 
folder list.  But to open a folder, it takes another page load so this 
adds a different layer of load.



Theoretically we could workaround this - but at some point, too many 
folders will crash the display no matter how we implement.  This is no 
different than trying to view a 10 MB text message or a MIME part with 
100 nested parts.  The best solution is, once a certain number of 
folders are reached, to tell the user they should be using less folders.
04/16/2009 08:16:37 AM clement (dot) hermann (at) businessdecision (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Dimp folder list never shows up when there is many (>1000) folders
Queue ⇒ DIMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Hi,



When there is a great number of imap folder, dimp portal never load 
the folder list (and links to applications such as kronolith or turba).



The javascript seems to wait for the complete folder list, and 
processing them takes a long time, eventually the browser gives up.



However, the "folder" view in imp is OK (it seems it does not load the 
subfolder unless needed).



Regards,

Saved Queries