[hunchentoot-devel] hunchentoot file upload performance
    Edi Weitz 
    edi at agharta.de
       
    Thu Nov 16 07:32:24 UTC 2006
    
    
  
On Wed, 15 Nov 2006 19:04:10 -0800, "Mac Chan" <emailmac at gmail.com> wrote:
> I then tried something like reading the whole buffer into a string
> and use the (parse-mime string) method instead of (parse-mime
> stream) (this is not a fix because if you upload 100mb file, it will
> allocate a 100mb buffer).
You could divide this in smaller buffers, but then it gets ugly.  See
below.
> The result is worse...
Yes, as I conjectured in my previous email.  The reason is that
FLEXI-STREAMS currently has to read in octet-size steps anyway.
> will investigate later. Also I plan do similar test with
> allegro-serve and see if it uses 100% cpu performing the same task.
I'm pretty sure it doesn't, mainly for two reasons:
1. For chunking and external format switching it uses AllegroCL's
   built-in "simple streams" - you're unlikely to beat that with
   portable Gray stream solutions like Chunga and FLEXI-STREAMS.
2. Lots of AllegroServe's source (to me) look like C code with
   parentheses around it - pre-allocated buffers and all that stuff.
   That's probably good for performance, but it's not the road I want
   to go.
Cheers,
Edi.
    
    
More information about the Tbnl-devel
mailing list