]> git.cworth.org Git - sup/commit
change email header parsing. MASSIVE SPEEDUP!
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 26 Apr 2009 15:44:37 +0000 (11:44 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 26 Apr 2009 15:50:59 +0000 (11:50 -0400)
commit6af3b3fc7fa791b4e253078747cd6d146c8cdb6a
tree6d13a0a83076eb6552a69d7d35e6092ad2beea5f
parentb5379b259f56afaee2669d91e0d4aa38265210af
change email header parsing. MASSIVE SPEEDUP!

restructure the email header parsing code to improve speed and to
improve API. MBox::read_header now returns a hash containing all
headers, with keys downcased but nothing else.

update Message#parse_header to accept this new format.

update unit tests to reflect new format.

The exciting news is that changes in how the parsing works have resulted
in a 480% speedup in message parsing speed (634 message/s vs 132
messages/s on my machine), across ALL source types. hell yes.
lib/sup/mbox.rb
lib/sup/message.rb
test/test_mbox_parsing.rb
test/test_message.rb