Logic Machine Forum
grp.exists() - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: grp.exists() (/showthread.php?tid=1591)



grp.exists() - buuuudzik - 14.09.2018

What is the simplest and minimum CPU power consuming way to check if there is a ga or alias with such name or address? I know about find but it has too much unnecessary data so maybe there is other way or maybe it would be nice to add other method which only returns true/false or add some additional parameter to find method to search if exists?


RE: grp.exists() - admin - 14.09.2018

I don't think that you can gain much by replacing grp.find with something simpler. If you need to do grp.find very often then you should cache the data somehow, maybe do a db query to get all objects at once.


RE: grp.exists() - buuuudzik - 14.09.2018

(14.09.2018, 12:57)admin Wrote: I don't think that you can gain much by replacing grp.find with something simpler. If you need to do grp.find very often then you should cache the data somehow, maybe do a db query to get all objects at once.

I have a project with hotel and I am creating and updating ga's based on json so I am searching the most efficient way for checking such thing. Thanks for replyWink