[Python-bugs-list] [Bug #110648] performance-problem decoding quoted-printable (PR#340)
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 23 Aug 2000 10:29:33 -0700
Bug #110648, was updated on 2000-Jul-31 21:10
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 4
Summary: performance-problem decoding quoted-printable (PR#340)
Details: Jitterbug-Id: 340
Submitted-By: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= <ragnark@vestdata.no>
Date: Fri, 26 May 2000 16:51:51 +0200
Version: None
OS: None
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi
Problem on python 1.5.1 on linux 2.2.14aa6.
Decoding quoted-printable files using mimetools.decode is really slow.
The really strange thing is, that it appers to work a lot faster on
smaller files!
I put together a little test-program that reads blocks from a file, and
decodes them individually. (The output will not be 100% correct. The
point was just to test the performance).
Results show the time it took to decode a 300k file with the diferent
block-sizes:
1k: 6.28 s
3k: 6.59 s
10k: 8.57 s
30k: 30.45 s
100k: 127.82 s
300k: 221.67 s
I looked in quopri.decode for clues about the problem, but could not
find any. Is there something _very_ wrong with my reasoning, or is
something wrong here?
--
Ragnar Kjørstad
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="test.py"
#!/usr/bin/python
from mimetools import decode
from StringIO import StringIO
from sys import stdout, argv
from string import atoi
bsize=atoi(argv[1])
output=StringIO()
f=open("mail-test")
s=f.read(bsize)
while s:
input=StringIO(s)
decode(input, output, 'quoted-printable')
s=f.read(bsize)
stdout.write('.')
stdout.flush()
stdout.write('done\n')
--7JfCtLOvnd9MIVvH--
====================================================================
Audit trail:
Tue Jul 11 08:25:57 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110648&group_id=5470