Using Webmail,
Whenever I open a very large folder in the mailbox, it can take literally forever (10 minutes or more if thousands of iterms).
Also, it looks like once all items are fully loaded, then you can literally step down each "page" of displayed items very quickly so it's likely all items are already loaded into the browser.
Although it might be useful if someone wanted to view each and every item (very unlikely) and no changes are made to each object (again, very unlikely), IMO this design can be vastly improved by
1. Making paginating calls to to the database. In other words, instead of fetching every item in the database, fetch only enough items to fill the viewable pane (eg top 50 if that many items are viewable. if the pane is re-sized to view 57 items, then fetch only 57 items). A "next" link or button should enable fetching the next "n" viewable items, and so on and so on.
2. Naturally, this type of call should be made with an AJAX enabled GUI (It looks like AJAX is utilized already for most of the GUI).
Also, I don't know if PostGRES supports database views, if so I wonder if using that as an intermediate layer might vastly improve performance instead of having to hit the disk when different mailbox folders' contents are modified (eg deleting items which moves items from Inbox to Deleted Items).
Again, the desired result is to fetch only the items which are viewable at a time to lessen the impact on the database engine which currently is slammed unnecessarily when vastly more than what is viewable is retrieved.
Tony