- Joined
- Dec 12, 2010
- Messages
- 2,074
WC3 written on C and uses typical caching method when it comes to strings. Every existing string being cached into virtual table which may improve mem use while working with tons of strings with the same content. You can learn more about it over the internet.
I've been using async strings in my LoD for a long time. I never knew about any kind of problems there, since I came up with jassing when v1.26 already been there. That means I totally miss glorious return bug times. So I asked the guy who had some experience back then about what he knows about desync caused by strings.
He answered that there was typecasting of strings to IDs, which actually means to their table's index.
Obviously, strings tables aren't synced - what the purpose? It's inner object with no purpose but to speed up perfomance. So chinese and english and russian players could met in the same map, having totally no issues about syncing. Remember - every string, every description, every tooltip is a string, which is cached and has some address and table index.
So, what been about desync. It happened when somebody decided to use string's index as a key for storing info. I believe it was due to lack of StringHash back then. Obviously whenever 2 players met, and they have different wc3 language, different CustomKeys settings or even modified map, bad things could happen.
But hey, it's 2016 already, and .24 with StringHash and removed RB been here for 8 years already. We don't care about indexing anymore. We just dont have to. We can declare any string we want locally, any amount of them, without any doubt.
TLDR: Stop false promising decyncs if somebody uses local declared strings - it wont' happen. You can try to proof desync by a real example tho. Until then it's a myth.
I've been using async strings in my LoD for a long time. I never knew about any kind of problems there, since I came up with jassing when v1.26 already been there. That means I totally miss glorious return bug times. So I asked the guy who had some experience back then about what he knows about desync caused by strings.
He answered that there was typecasting of strings to IDs, which actually means to their table's index.
Obviously, strings tables aren't synced - what the purpose? It's inner object with no purpose but to speed up perfomance. So chinese and english and russian players could met in the same map, having totally no issues about syncing. Remember - every string, every description, every tooltip is a string, which is cached and has some address and table index.
So, what been about desync. It happened when somebody decided to use string's index as a key for storing info. I believe it was due to lack of StringHash back then. Obviously whenever 2 players met, and they have different wc3 language, different CustomKeys settings or even modified map, bad things could happen.
But hey, it's 2016 already, and .24 with StringHash and removed RB been here for 8 years already. We don't care about indexing anymore. We just dont have to. We can declare any string we want locally, any amount of them, without any doubt.
TLDR: Stop false promising decyncs if somebody uses local declared strings - it wont' happen. You can try to proof desync by a real example tho. Until then it's a myth.