This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Global static lookup table
#1
I need to create a static lookup table, mapping elements of the group addresses to specific rooms in the building. The table is fixed (i.e. will not be changed during run-time - only used for lookup). Number of GAs is approximately 100 and number of rooms is approximately 30 (to give you a feeling of size - i.e. not too big). Approximately 10 scripts will need to use the table (each one running approximately every 5-10 minutes)

If I understand LM correctly, I can not initialize some global variable in the LM that every script can read from (which would clearly have been efficient).

Assuming this is correct, from a performance point-of-view: What is the best way to create this lookup table to be used by multiple scripts?
a) Via storage.set/get (one script could use storage.set during initial start-up of LM and then each script does a storage.get as part of initial housekeeping)
b) Initializing a new table inside the code of each script (i.e. build the table run-time - most likely via a common function called from each of the scripts)
c) Other ways?

Thanks in advance

WISH ALL USERS A HAPPY NEW YEAR
Reply
#2
You can create a user library and include it in every script that needs it.
Reply


Forum Jump: