HOWTO: Speedup downloading large attachments in Thunderbird

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

HOWTO: Speedup downloading large attachments in Thunderbird

Postby martin » 2005-08-02 20:41

When downloading large attachments in Thunderbird, it often downloads the attachments in small chunks. For example, if you send an attachment with the size of 1MB, Thunderbird may download the message in 10kb parts. This may result in over 100 seperate requests to the IMAP server. Since hMailServer can't have the entire message in memory all the time (that would require to much memory resources), hMailServer have to open,read,close the file between every fetch.

To override this behaviour,

1) Open the file \Mozilla Thunderbird\defaults\pref\mailnews.js
2) Search for fetch_by_chunks. You should find two occurances of this. Set the value of these two parameters to false instead of true.

After that, restart Thunderbird. On my computer, downloading an attachment is at least 15-20 times faster.

(I've made a post in the Thunderbird forum asking about this)
Last edited by martin on 2006-07-10 12:49, edited 1 time in total.

User avatar
TheAngryPenguin
Senior user
Senior user
Posts: 341
Joined: 2004-10-11 20:51

Postby TheAngryPenguin » 2005-08-02 23:54

Nice work! I've always wondered why TB handled attachments so poorly...

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Postby martin » 2005-08-03 01:45

Jupp.. Well, there's a lot of improvements that can be done on hMailServer when it comes to IMAP performance. I think I'll implement some of those in 4.2..

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Re: Speedup: Downloading large attachments in Thunderbird

Postby GlenC » 2005-08-10 03:17

martin wrote:To override this behaviour,

1) Open the file \Mozilla Thunderbird\defaults\pref\mailnews.js
2) Search for fetch_by_chunks. You should find two occurances of this. Set the value of these two parameters to false instead of true.

(I've made a post in the Thunderbird forum asking about this)


I'm wondering if anyone knows.... can this pref be set in prefs.js instead of mailnews.js? I'm thinking a future upgrade would overwrite the mailnews.js file. I've tried it in prefs.js but personally can't tell the difference, and I'm not quite sure how to best test it.

Martin, did you ever get any replies back in the forum? I looked but never found your original post.

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Postby martin » 2005-08-10 03:29

How big was the attachment? You should probably have an attachment on around 1 MB to notice the difference. Also, since this may be a bug in Thunderbird, I'm far from sure when or why it happens.

Mozillazine.org is so extremly slow and filled with topics so that it's almost impossible to search and find others with the same problem. Takes me like a minute to do a single search and the another when clicking on each row in the result..

Here's my post. I just added an "anyone?" to bring it top the top.. :)
http://forums.mozillazine.org/viewtopic.php?p=1647414

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Postby GlenC » 2005-08-10 16:27

Ok... I tested with a 3mb file and it appears to me that prefs.js overrides mailnews.js defaults. So that seems to work and it does seem to be quite an improvement!

You're right about mozillazine. Slow as molasses... at times in the past they would shut down searching altogether because the site was so overloaded.

Thunderbird has a ton of features, lots of hidden prefs like the one you found. They really should be documented better I think.

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Postby martin » 2005-08-10 16:32

Yupp.. The only place I found that setting documented was in the Netscape documentation. :)

The forum at mozillazine should have been splitted up in several databases. Running _one_ forum with 1,6 million articles feels a bit overkill. :)

westdam
Senior user
Senior user
Posts: 727
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Postby westdam » 2007-11-03 14:09

does it works on tb2?
and on linux? cant find te files mailnews.js

westdam
Senior user
Senior user
Posts: 727
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Postby westdam » 2007-11-03 14:14

found..on the advanced preferences..

umtauscher
Normal user
Normal user
Posts: 38
Joined: 2007-09-17 11:53

Re: HOWTO: Speedup downloading large attachments in Thunderbird

Postby umtauscher » 2008-11-18 11:24

Hi Martin,

thank you so much for this hint! This improves TB imap performance on any imap server.
hMailServer is just the best!

Cheers
Wilhelm


Return to “General discussions”



Who is online

Users browsing this forum: No registered users and 25 guests