So I've made the loadtimes a bit worse now but not to worry. Behind the scenes I've set things up a bit nice now and in the next week(s) I hope to change some of the functions which are called on load to make them less taxing.
To explain it in simple terms this is what is happening now:
LOADING
- NATIONS
+ Check each character if the nation is correct by scrolling trough all of them
- ACTIVE PERKS
+ Check if any perk is still active so it gets the right event by scrolling trough all characters and checking them
- SHIPS
+ Check if a ship was sailing away etc by checking all characters to see if they are there etc
etc
You see this is 3 times there is a loop going trough all characters already. There is at least 1 more for logging in the characters in the location. This one is always called. And I hope to add most of the stuff which is done here to this loop instead so we only have to loop trough all characters once.
That should hopefully increase the loadspeed again a bit
.
To explain it in simple terms this is what is happening now:
LOADING
- NATIONS
+ Check each character if the nation is correct by scrolling trough all of them
- ACTIVE PERKS
+ Check if any perk is still active so it gets the right event by scrolling trough all characters and checking them
- SHIPS
+ Check if a ship was sailing away etc by checking all characters to see if they are there etc
etc
You see this is 3 times there is a loop going trough all characters already. There is at least 1 more for logging in the characters in the location. This one is always called. And I hope to add most of the stuff which is done here to this loop instead so we only have to loop trough all characters once.
That should hopefully increase the loadspeed again a bit
