[Kde-pim] Smart/Inline Attachements + Large files
BJ Blanchard
blabj at dainty.ca
Tue Nov 7 18:21:58 GMT 2006
On Wednesday 25 October 2006 10:40, BJ Blanchard wrote:
> On Tuesday 24 October 2006 18:33, Ingo Klöcker wrote:
> > On Tuesday 24 October 2006 20:47, BJ Blanchard wrote:
> > > Hi all,
> > >
> > > When I receive large attachments (5MB tiff files for example) with
> > > Smart or Inline attachment viewing, and click on the email.. kontact
> > > hangs during message preview creation.. which in my case can take up
> > > to a minute - allowing you to do nothing else - and sometimes crashes
> > > when multiple attempts are made to click on other areas of kontact.
> > >
> > > What do you guys think about putting a limit on the size of
> > > attachments which would force a fallback to viewing attachments as
> > > icons? IE. if attachment > 1MB then view as icon only.
> >
> > I'm not sure. Sounds like a pretty arbitrary limit and will surely lead
> > to bug reports because "KMail shows only some of the attached photos
> > inline". And the problem really isn't the file size of the attachment
> > but the dimension of the image.
> >
> > Regards,
> > Ingo
>
> We are working on a patch that would only affect "Smart" attachment
> strategy, and would be drivin by a configuration setting like
> "MaxSizeSmartAttachment". (thus not arbitrary ;) ) If this configuration
> setting is missing/not set, behaviour would continue as it currently is.
>
> Not sure if this would be acceptable by the community as a whole, but we
> definitely need it. A "busy" message, although better than an
> apparent "hang", still doesn't solve the problem of the delay [which is
> significant on a 30-user system!]
>
> I would tell my users to use "As Icons" for attachment strategy, but this
> is simply does not work in this world of HTMLized emails [as much as i hate
> them] - because the actual body of the message ends up showing as an icon.
>
> BJ.
Here is the patch we are using.. makes huge performance difference for us when
dealing with large attachments.
We just add this to global kmailrc under [General]:
SmartAttachmentSizeLimit=100000
And any attachment over 100,000 bytes displays as an icon.
BJ.
Index: attachmentstrategy.cpp
===================================================================
--- attachmentstrategy.cpp (revision 598866)
+++ attachmentstrategy.cpp (working copy)
@@ -38,6 +38,8 @@
#include "partNode.h"
#include "kmmsgpart.h"
+#include "globalsettings.h"
+
#include <qstring.h>
#include <kdebug.h>
@@ -86,6 +88,9 @@
bool inlineNestedMessages() const { return true; }
Display defaultDisplay( const partNode * node ) const {
+ if ( GlobalSettings::self()->smartAttachmentSizeLimit() > 0 &&
+ node->msgPart().decodedSize() >
GlobalSettings::self()->smartAttachmentSizeLimit() )
+ return AsIcon;
if ( node->hasContentDispositionInline() )
// explict "inline" disposition:
return Inline;
Index: kmail.kcfg
===================================================================
--- kmail.kcfg (revision 598866)
+++ kmail.kcfg (working copy)
@@ -112,6 +112,12 @@
<entry name="FolderLoadingTimeout" type="Int" hidden="true">
<default>1000</default>
</entry>
+ <entry name="SmartAttachmentSizeLimit" type="Int">
+ <label>Maximum inline attachment size</label>
+ <whatsthis><qt> <i>Email attachments which exceed this
size will be shown as icons. A value of -1 disables the
limit.</qt></whatsthis>
+ <default>-1</default>
+ </entry>
+
</group>
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
More information about the kde-pim
mailing list