Posts: 940
Threads: 161
Joined: Jul 2015
Reputation:
33
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?
Done is better than perfect
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
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.
Posts: 940
Threads: 161
Joined: Jul 2015
Reputation:
33
(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 reply
Done is better than perfect