From 8c2c36755eed315c50913c4e81e5b5c816d86d28 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Fri, 21 Dec 2012 21:36:32 -0500 Subject: [PATCH] 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. --- zipline/gens/sort.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/zipline/gens/sort.py b/zipline/gens/sort.py index 8afd6031..668fd087 100644 --- a/zipline/gens/sort.py +++ b/zipline/gens/sort.py @@ -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