• Dear forum reader,

    To actively participate on the forum by joining discussions or starting your own threads or topics, you need a game account and to REGISTER HERE!

Duplicate freezes and memory leaks on world map


Well-Known Member
Game version: v1.154-beta.2-(2e5be30) - html5 (2022-05-19 10:50)
Game world: Beta1
Browser/IOS/Android + version: Chrome x64
Operating System or Mobile Device: Windows 10
Screen resolution: 2560x1600
Account name: Karvest
Humans or Elves: Elves

Reproducibility: 5/5 (1/5 = happened once; 2/5 = happens randomly; 3/5 = happens sometimes; 4/5 = happens often, but not always; 5/5 = happens always)

Quest title: (if applicable)

Current situation:
I made some research trying to figure out why there is a huge (0.5 seconds) freeze after each NH made from neighbors list on world map.
Cause of these freezes is game recreating every scoutable province button after each resources update message received (so the more provinces you have - the more time it takes and the more memory is leaked in discarded buttons).
After removing ResourcesModelEvent::updateResources event listener in de.innogames.onyx.worldmap.view.layers.ScoutingViewManager freezes are gone.
As a side effect I was able to fight 30 provinces x 6* in a row without game restart. Without this change I'm forced to reload every 5-10 provinces x 6* as game becomes slow due to memory leaks (5 provinces leak more memory than 30 with removed listener).
Not sure why this listener is there at all, to show if you have enough money to scout? Not worth lags and memory leaks.

Expected situation:
Smooth NH on world map and tournament without game restarts.

Reproduction Steps:
1. Have a big amount of completed provinces (500+, the more you have - the bigger impact) => big amount of provinces to scout (locked or not - doesn't matter)
2. give NH from neighbors list on world map
3. notice freeze after each NH while blimps are flying up (0.5 sec here on i5-4570)


Community Manager
Elvenar Team
Ah, this is a duplicate of the freezing issues mentioned in this thread and is already under investigation by our development team. I'll forward your findings, but let's keep everything in the other thread. I'll change the title there to make it more obvious.


Well-Known Member
I can see same code in 4 year old client files. Just there were no NH from world map, and amount of provinces was smaller...


Well-Known Member
btw, it's also worth removing WorldMapViewEvent::drawGrid event on each de.innogames.onyx.worldmap.controller.UpdateProvincesCommand for city type provinces, as there is no reason to update map while neighbors list is opened on top, it's enough to redraw map once when you close this list.
With both changes NH becomes really fluent with almost 0 response time.

This topic is not about random freezes that stop your game until you reload it like the one you've mentioned, but about annoying regular lags happening with 100% chance, caused by bad coding decisions.