mdaffa48 / SSB2-AdvancedSlimeWorldManager

Advanced-SlimeWorldManager add-on for SuperiorSkyblock2
4 stars 5 forks source link

Is it possible to create the world when it is useful? #3

Open mocha666 opened 2 years ago

mocha666 commented 2 years ago

It will load all worlds into memory when the server is loaded, and save all loaded worlds when saving regularly. In this way, it will occupy a lot of system resources and cause the server to crash

I think we can try to load the world when the empty Island members are online and unload the world when they are offline. In this way, the server performance will be greatly optimized

ElBananaa commented 2 years ago

It will load all worlds into memory when the server is loaded, and save all loaded worlds when saving regularly. In this way, it will occupy a lot of system resources and cause the server to crash

I think we can try to load the world when the empty Island members are online and unload the world when they are offline. In this way, the server performance will be greatly optimized

I'm pretty sure loading/unloading worlds on demand like that would be heavier than actually keeping the worlds loaded all the time. I can't imagine the huge lag spike this would cause if a few players from different islands join the server with only a few seconds delay ^^

mocha666 commented 2 years ago

It will load all worlds into memory when the server is loaded, and save all loaded worlds when saving regularly. In this way, it will occupy a lot of system resources and cause the server to crash I think we can try to load the world when the empty Island members are online and unload the world when they are offline. In this way, the server performance will be greatly optimized

I'm pretty sure loading/unloading worlds on demand like that would be heavier than actually keeping the worlds loaded all the time. I can't imagine the huge lag spike this would cause if a few players from different islands join the server with only a few seconds delay ^^

Well, it may be the performance problem of my server, because after a period of time, as the number of new empty islands of the server increases, the server will save all SWM worlds when saving the world, and my server will often crash at this time, resulting in the destruction of the server archive. It may be that I am using 1.12 2 server version because my location is in China. The highest MC version of minecraft China, which is represented by Netease, is 1.12 So there may be some incompatibilities haha

mdaffa48 commented 2 years ago

It will load all worlds into memory when the server is loaded, and save all loaded worlds when saving regularly. In this way, it will occupy a lot of system resources and cause the server to crash

I think we can try to load the world when the empty Island members are online and unload the world when they are offline. In this way, the server performance will be greatly optimized

When does the creation of empty island occurs? My guess is after you disband the island.

mocha666 commented 2 years ago

When does the creation of empty island occurs? My guess is after you disband the island.

yes ,I don't know why this happens

mdaffa48 commented 2 years ago

When does the creation of empty island occurs? My guess is after you disband the island.

yes ,I don't know why this happens

The empty island created somehow because of a method is being called upon disbanding island and that methods triggers creating an empty worlds. The solution that I get from Ome_R is to delay deleting the island after disbanding by several ticks. I'll try to fix this problem.