commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject RE: File Upload project
Date Tue, 11 Feb 2003 05:28:55 GMT
First of all, you are more likely to receive a timely and helpful response
if you post your questions to the appropriate mailing list, as documented on
the FileUpload web page, rather than to individuals. There is no single
"point person" for Jakarta projects. I am cc'ing the appropriate list on
this reply.

Note that the current code is only looking within a region of the current
buffer, and does not have the entire stream available to search in. The code
you provided appears to be based on having all of the input available.

Nevertheless, if you believe that using this algorithm would provide a
noticeable performance improvement over the existing algorithm, I would
encourage you to submit an enhancement request, as described here:

http://jakarta.apache.org/site/bugs.html

and provide a patch to the current code.

--
Martin Cooper


> -----Original Message-----
> From: Ricardo Clements [mailto:rclements_63@yahoo.com]
> Sent: Monday, February 10, 2003 8:59 PM
> To: martin.cooper@tumbleweed.com; dion@apache.org; 
> jmcnally@collab.net;
> dlr@finemaltcoding.com; jason@zenplex.com; rdonkin@apache.org
> Subject: File Upload project
> 
> 
> Sorry about emailing to all of you, but not sure who is the point
> person.
> 
> I have just had your project pointed out to me, and having recently
> added multipart support for an internal (pre-struts) servlet 
> framework,
> I took a look at the source.
> 
> One of the areas I think we could improve is the technique for finding
> the next boundry MultipartStream::findSeparator();
> 
> At present the algorithm actually compares every character looking for
> the first char of the boundry string.  This can be very inefficient,
> especially  if the - or multiple ----- exist in a large upload. 
> 
> A simple and very efficient algorithm is the Boyer Moore search
> algorithm (see attachment).  I used this in my implementation when
> scanning the buffer for the start of the boundry string.  The algoritm
> does require some setup but that cost will only be incured once.
> 
> Feel free to use the code if you choose and I would be willing to lend
> a hand if desired.
> 
> Since there is no main in this class you might run it like :
> 
> (new BoyerMooreSearch("Try to say the bay in the day after daylight",
> "ayl")).search();
> 
> This will look for "ayl" in the first arg.  the longer the search
> pattern the more efficient it can be
> 
> Enjoy
> Ricardo Clements
> ricardo.clements@conceptrendering.com
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message