Hi Friends
in case we have just one main collection with one object ( bean in addressing manual ) and one sprite on it, is there any difference in performance between these two kind of addressing:
is there any difference in different kind of addressing in general?
3 hours later edit:
i did message chaining like that one on defold manual, in both relative and absolute addressing i got 190 messages between each updates, so i think there is not any difference but i’m interested if someone else gives more info about it.
I haven’t tested actually sending messages, but msg.url() definitely takes a different amount of time depending on what you give it, and I assume msg.post() has to evaluate the address the same way.
A quick test, calling msg.url in a loop with a few hundred thousand iterations:
‘URL object’ took 206.01273 ms
‘No address’ took 395.02144 ms
‘String “.”’ took 423.02513 ms
‘String “#”’ took 396.02280 ms
‘String relative address’ took 717.04102 ms
‘String absolute address’ took 361.02104 ms
For an object that I will use repeatedly, I get its URL once on init and store it in “self” to use later.
Yes I wanted to know about message.post() to know which way is faster to communicate between objects and components. cool results about msg.url(), maybe these times help me and others later