Re: mod_python.util.StorageField.read_to_boundary has problems in 3.1 and 3.2

2005-11-08 Thread Mike Looijmans
Here's one that passes all the tests, and is 2x as fast as the 'current' and 'new' implementations on random binary data. I haven't been able to generate data where the 'mike' version is slower: def read_to_boundary(self, req, boundary, file, readBlockSize=65536): prevline =

Re: mod_python.util.StorageField.read_to_boundary has problems in 3.1 and 3.2

2005-11-08 Thread Alexis Marrero
Thanks for that improvement, don't like its complexity though. I'm testing mikes version with my set of files I will all let you know how it goes. BTW, the line that reads last_bound = boundary + '--' so we save 4 CPU cycles there :) The next test that I will run this against will be

Re: mod_python.util.StorageField.read_to_boundary has problems in 3.1 and 3.2

2005-11-08 Thread Alexis Marrero
Inspired by Mike's changes I made some changes the new version to improve performance while keeping readability: def read_to_boundary_new(self, req, boundary, file, readBlockSize): previous_delimiter = '' bound_length = len(boundary) while 1: line =

[jira] Created: (MODPYTHON-87) psp_parser: replaces \n on \n

2005-11-08 Thread Anton Kuzmin (JIRA)
LF character Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit psp_parser: replaces \n on \n LF character - Key: MODPYTHON-87 URL: http://issues.apache.org/jira/browse/MODPYTHON-87 Project: