potassco / clorm

🗃️ A Python ORM-like interface for the Clingo Answer Set Programming (ASP) reasoner
https://clorm.readthedocs.io
MIT License
52 stars 5 forks source link

Noclingo enable flag #93

Closed daveraja closed 2 years ago

daveraja commented 2 years ago

Being able to switch to/from NOCLINGO mode is now disabled by default. It is probably not useful for most applications and so is worthwhile disabling by default for the small performance increase when creating fact objects (disabling it reduces some function indirection).

To enable the environment variable CLORM_NOCLINGO must be set (to one of "true", "1", "yes", "enabled") before the clorm.orm.noclingo module is loaded. This can be set in your shell environment or using python with os.environ["CLORM_NOCLINGO"] = "True". If you set it using python make sure it is set before loading other libraries.