[openlp-dev] Changes to Settings code.

Tim and Alison Bentley Home at trarbentley.net
Mon Jan 6 12:35:09 EST 2020


Over the last few months work has been progressing to improve the
performance of OpenLP at startup.  The main culprit has been Settings()
which we believed was a singleton but turned out to be a plain object.

In the main codebase today there are now two new ways to get a settings
object.  If your object extends RegistryProperties then all you need to do
is use self.settings.

If your object does not extend RegistryProperties add self.settings =
Registry().get('settings')  to your constructor and then access
self.settings.

Clean up work is underway but no new code should be added using the
Settings()  method.

In a parallel development, the definition of all settings has been moved to
the central settings.py file.  This means we have one place for the
definitions (and no duplicates)!


-- 
Tim and Alison Bentley
Home at TRARBentley.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openlp.io/pipermail/openlp-dev/attachments/20200106/028c3a1d/attachment.html>


More information about the openlp-dev mailing list