Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

Re: [dbmail-memcache] regex for attachments - Leverage This!!

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


skraps at hushmail

Apr 10, 2012, 9:19 AM

Post #1 of 1 (183 views)
Permalink
Re: [dbmail-memcache] regex for attachments - Leverage This!!

The way its done now eats up 5% of my CPU!!!! Because its really
elaborate the way its done but it's killer on resources. I'm trying to
move the attachements to a seperate table searching for them with
g_mime_object_get_disposition

It always returns null as a response. This test was performed on a
message with 10 jpgs attached ranging from 20-90kb in size.
So if the attachments where separated from the messages completely
and replaced with downloadable links then that 5%
could drop down to .5% at a fraction of the time to process.MySQL at
5% of the CPU with one user that would start to
heavily load the system if 20 users where all checking their mail at
the same time. maybe even remove the mime encoding and just place the
type, filename, size and
base64 data into a table alone, away from the messages. This change
would also make it easier for Key value systems to be implemented into
the setup. Just moving the
attachments to another table. If the email is not mime encoded, it
takes up 2 slots in the mime table, if it is encoded it takes up 4, If
this was dumbed down from
the elegance that it has now, it would actually be a little more
efficient. Less loops, less rows to fetch,smaller overhead all around.

I'm not bashing it at all. It's amazing how who evers mind works that
designed it but its doing a lot of work, is it not?

On 04/10/2012 at 3:23 AM, Paul J Stevens wrote:On 04/10/2012 03:32
AM, skraps [at] hushmail wrote:
> I think this is the proper regex for grabbing attachments. This was
> tested on a message taken from a mbox, I have not setup dbmail along
> side post fix on my test environment.
>
> ^[-]{1,19}[0-9]{1,}n[a-zA-Z0-9-:
> /\";=n.]{1,}Content-Disposition: attachment;[a-zA-Z0-9-:
> /\";-+=n.]{1,}[^$-]{1,}[0-9]{1,}[-]{1,}
>
> I think this is right any objections?

DBMail already does full mime deconstruction and single instance
storage
of mime parts. Leverage that!
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.