mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-29 13:00:42 +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:
1 parent
e8c5203e31
commit
a30c4fc689
1 file changed
+4
-1
@@ -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