• Hello, Guest!
    Are you passionate about Tribal Wars 2 and like to help your fellow players?
    We currently have open positions for Forum Moderators!

    >> Join the Tribal Wars 2 Team now! <<
    We would love to hear from you!

Village Loading Delay ("long running scripts") - WITH Cause & Solution

DeletedUser687

Guest
Since v1.12 There has been a significant delay when switching villages causing scripts to be "long running" or "non-responsive". And if they do respond, it takes somewhere between 3 and 10 seconds to switch between villages.

I've done some extensive research on the issue and managed to find the cause and a possible solution (for the devs to implement).

What causes the delay is the emitting of the CHAT_GET_TRIBE_HISTORY. This occurs every time when a player changes village due to the fact that there is a listener to the 'DONE' event, which is also broadcast whenever a village has been loaded.
The reload of the chat history isn't needed in the first place, as it is already loaded and additional new messages are received in a different way.

A solution for this problem is to change the 'DONE' event, or simply add a boolean to check if chat history was already loaded or not, if not, it should emit the request, otherwise it should simply do nothing at all.

--
So as a player, you can't fix it as it's a problem with the game itself. So you'll have to wait for the devs to fix it.
How did I manage to fix it? MAGIC :D - no really, magic ;).

---
Not sure how much this is appreciated or allowed, but I've created an extension for Chrome which resolves this issue.

Link to the extension: https://chrome.google.com/webstore/detail/tw2-v112-village-loading/fpjilmeanlbddbodkfponjahhinlggea

The extension is open-source and thus anyone can peek into how I've fixed it for now until the devs come with their solution.

PLEASE NOTE: At the time of posting this, I have NO official confirmation if this extension is allowed or acceptable.
 

DeletedUser16

Guest
Thank you for your research, it is highly appreciated. I have forwarded your post to our development team for them to review it. :)
 

DeletedUser

Guest
There wasn't this lag before the 1.12 update. And it's noticeably bad not only when switching from one village to another but also when you go into the Village screen (the one where you can see your buildings surrounded by the wall). It takes several seconds before you can access a buildings menu. It's really starting to put me off playing.
 

DeletedUser687

Guest
Malyn;n29079 said:
There wasn't this lag before the 1.12 update. And it's noticeably bad not only when switching from one village to another but also when you go into the Village screen (the one where you can see your buildings surrounded by the wall). It takes several seconds before you can access a buildings menu. It's really starting to put me off playing.

I can certainly understand as when entering your village the Tribe Chat History is requested 3 times in a row! - This how ever would not occur when using my chrome extension as it'll only allow loading of the tribe chat history once (when loading the game the first time, or when refreshing your browser page)
I hope the devs will be able to analyze my finding and consider my solution proposals (or come up with a different one) soon and bring a fix for the game to make my extension unnecessary.
 

DeletedUser299

Guest
The tribe chat history was something that wasn't needed in the first place (yes I know some players asked for it).

The idea of a chat is its a live chat not a history book. You join the conversation from when you log on same as in real life you don't get a backdated conversation when you start talking to a group of people.
 
Top