mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-16 11:18:11 +08:00
PERF: Don't build an AssetFinder if no engine is provided
This is an optimization where we're building an environment but not using its finder. Ideally, the consumer would use just the calendar, but it's not fully featured quite yet.
This commit is contained in:
@@ -121,7 +121,10 @@ class TradingEnvironment(object):
|
||||
else:
|
||||
self.engine = engine = asset_db_path
|
||||
|
||||
self.asset_finder = AssetFinder(engine)
|
||||
if engine is not None:
|
||||
self.asset_finder = AssetFinder(engine)
|
||||
else:
|
||||
self.asset_finder = None
|
||||
|
||||
def write_data(self,
|
||||
engine=None,
|
||||
|
||||
Reference in New Issue
Block a user