Consider prototypes loaded only when called on search

This commit is contained in:
ChrisLR 2022-03-19 19:12:09 -04:00
parent fdff5f6cd2
commit 39d300458c

View file

@ -528,8 +528,10 @@ def search_prototype(
"""
# This will load the prototypes the first time they are searched
if not _MODULE_PROTOTYPE_MODULES:
loaded = getattr(load_module_prototypes, '_LOADED', False)
if not loaded:
load_module_prototypes()
setattr(load_module_prototypes, '_LOADED', True)
# prototype keys are always in lowecase
if key: