Removes assert of message confirming to protocol.

Two reasons for removal:
- On the path of removing most non-postconditional asserts.
  Since the asserts on every message is incurring a
  non-insignificant penalty on large datasets.
- Since the assert was invoked as a function, the 'right side'
  of the assert statement, i.e. the error message was being invoked
  as a function, discovered since the __repr__ of the message was
  high on the bottleneck list.
This commit is contained in:
Eddie Hebert
2012-12-21 21:36:32 -05:00
parent 8f6ff20e6a
commit 8c2c36755e
-5
View File
@@ -20,7 +20,6 @@ import logbook
from collections import deque
from zipline.gens.utils import (
assert_datasource_unframe_protocol,
assert_sort_protocol
)
@@ -44,10 +43,6 @@ def date_sort(stream_in, source_ids):
# Process incoming streams.
for message in stream_in:
# Incoming messages should be the output of DATASOURCE_UNFRAME.
assert_datasource_unframe_protocol(message), \
"Bad message in date_sort: %s" % message
# Only allow messages from sources we expect.
assert message.source_id in sources, "Unexpected source: %s" % message