Maintenance for the week of June 23:
• PC/Mac: No maintenance – June 23
• PC/Mac: NA and EU megaservers for maintenance – June 25, 12:00AM EDT (4:00 UTC) - 6:00PM EDT (22:00 UTC)
The issues on the European console megaservers have been resolved at this time. If you continue to experience difficulties at login, please restart your client. Thank you for your patience!

Possible Performance Improvement Suggestion

Tornaad
Tornaad
✭✭✭✭✭
I have grown to like the idea of the timers for the horse training and daily quests being based on a set time each day and I know that was done to help boost server performance.
From there, I got to thinking, what if the same thing was done with researching item traits?

Obviously, there are a few things that would need to be adjusted for that to happen, specifically, the length of time it takes to research new traits. Instead of counting the time in days and hours, it would just count in days, then any time saved from things like ESO plus, would always reduce it by whole days.
You can find the current research times here

A possible suggestion for how much time it could take to research each trait is the following:
1st trait = 1 day
2nd trait = 2 days
3rd trait = 3 days
4th trait = 4 days
5th trait = 5 days
6th trait = 8 days
7th trait = 16 days
8th trait = 32 days
9th trait = 64 days

For traits 3 through 9, this would increase the combined research time by about 2.83 days, and for the first two traits it would take the combined time from 1 day to 2 days (combined) leaving the total increase at 3.83 days. However, this would also mean that if the players start their research closer to the time of the server reset at O dark 30 in the morning then they will easily be able to cut a lot of that time off. For example, if a player logged on an hour before the time when the horse training and daily quests currently reset, and started their next traits researching, an hour later, their research times would decrease by a day. This would have the benefit of making it less critical for when the player logs on to start new research, thus making it feel like less of a chore for the player to research all of their traits. It would have the added benefit of dramatically reducing the number of checks the server would have to complete for each researched item. The remaining time would then go from all research timers starting at random times of the day to just needing to track how many days are remaining in the research.

There are 4 main types of reseach (metal, cloth, wood, jewelry) and when fully maxed out, each of those (with the exception of jewelry) research types can have 3 active traits that can be researched at any one time. Jewlery has at most 1 type that can be researched. Thus, that is a total of 13 traits that can be researched per player at any given time.

According to the MMO population website ESO has an active daily player base of 219,021 players. If we assume that only 10% of those are actively researching traits that would mean 21,902 players are actively researching traits. That would mean that at any one time, the servers are keeping track of a potential 284,726 separate timers. By switching the research to daily ticks, you can then remove every one of the timers and instead put ticks that would just be counted down.

A simple example of how this could look (if implemented in Python) could be as follows:

def Trait_Research_Tracker (research_length):
research_length -= 1
return research_length

That is built assuming the data is stored in a queue data structure, and able to be pulled out in O(1)
1 time. It is also built under the assumption that it would be returned back into the same queue data structure for processing later. And from there, each time server moves from one day to the next it will run this function and reduce the remaining count of days for each item being researched. The same concept could be done with a dictionary, and a separate function could pull out the remaining days from each player's dictionary (obviously stored in a class), and from there, nearly 300,000 timers are reduced to a once a day function that pulls a value from a dictionary, subtracts one from it, and updates the value afterwards. And the remaining time left would simply involve pulling the remaining days from the dictionary and placing it before the same timer that shows how much time you have left before you can train your horse next.
Edited by Tornaad on September 4, 2023 7:33PM
  • RicAlmighty
    RicAlmighty
    ✭✭✭✭✭
    With all respect, your post demonstrates a misunderstanding of how this data is stored and retrieved.

    I have grown to like the idea of the timers for the horse training and daily quests being based on a set time each day and I know that was done to help boost server performance.

    I'm not sure this was done to boost performance as much as it was done to standardize the timers to a single time. Since they were running on a 20 hour cycle anyway, it was not much of a hardship to run them on a 24 hour cycle instead, and it would as mentioned simplify the need to track individual training timers.

    Since research timers work quite differently, I do not see this as much of a benefit over the system that exists today. Increasing the time to research the first two traits from 6 and 12 hours respectively to 24 and 48 hours would be quite a degraded experience for most players.

    In terms of the way that the data is stored and retrieved...
    That would mean that at any one time, the servers are keeping track of a potential 284,726 separate timers

    I'm not entirely sure what point you're trying to make with this, but this is an insignificant amount of data. Moreover, it is simply stored as a date value (most likely a ms since 1970 long int). The value stored is the date-time when the research started. Then it is a simple fetch of those values at run time for each trait a character is currently researching. The calculation to determine expiration is done client side for display and is trivial. Even if we doubled your estimate of 284,000 values, using an unsigned 32-bit int, that only amounts to 2.4 MB worth of storage, which clearly is trivial.

    There is no benefit to storing the timer as a fixed day offset, when storing a datetime is just as efficient and more granular.
    It would have the added benefit of dramatically reducing the number of checks the server would have to complete for each researched item.

    It would not do this. The program only checks once when the character data is loaded, that's it. It has to do this for each character at the time they are loaded regardless of how the data is stored or tracked. So your proposal would be of no benefit.

    ESO does not store all of this data on the backend in memory. This is stored in a database that is queried when necessary and the data for one specific character is fetched and returned to the client. I am sure they are caching data related to in game activity and location and such, but it serves little purpose to cache something that has a simple value which can be queried on demand. If a player uses a research scroll, a request is made to the server to reduce the stored timer for that specific researchID by one day. Again, this is a trivially simple operation and is in all likelihood already quite performant.

    I hope this helped clarify some things for you. I have been a systems engineer for close to 30 years and a programmer for longer than that.




    Edited by RicAlmighty on September 4, 2023 6:36PM
    Content Pass is not the answer. It is a question, the answer is No.
  • Tornaad
    Tornaad
    ✭✭✭✭✭
    My understanding was that it was done for performance. And you are right, I do not know a lot about server performance. I also now see a simple mistake I made in calculating time which would very much affect a few calculations.
Sign In or Register to comment.