new sort of lags

Krecha

Newbie III
Supporter
Only time in packet is wrong, some macros use this value for counter. Remove buff packet works well and removes the icon at the right time.

But maybe the scripts execute slower on the new framewrok - and the code calculates the difference in time from creating the bufinfo to sending the packet - or the time function itself is more accurate?
 

Dan

Staff Member
Administrator
Game Master
Only time in packet is wrong, some macros use this value for counter. Remove buff packet works well and removes the icon at the right time.

But maybe the scripts execute slower on the new framewrok - and the code calculates the difference in time from creating the bufinfo to sending the packet - or the time function itself is more accurate?
It is probably a mix of all those things. It may require a re-tweaking of whatever calculations are done or what mechanisms add the timer times. Each object that creates a timer sends the duration of that timer to the buff bar if it has it on creation.

It seems counterproductive at first that "upgrading" would make things worse, but it is just because the way things are handled under the hood at the operating system level have now changed. There are new better ways to do things that need to be explored, and old legacy ways of doing things that need to be upgraded. The end product is almost always better than the project it was built off of. We are just going to have some growing pains in the meantime.

In the meantime, if anyone has Visual Studio or some other IDE installed and wants to explore tweaking the buff icons and packets to increase accuracy and comes up with something viable, please let me know.

There is another PR about to get pushed to TrueUO, that is currently live on Heritage, that completely changes how timers specifically work. Instead of threading timers and using priority they are all just stored in a timer wheel. https://github.com/TrueUO/TrueUO/pull/1275

However, I don't think these changes have anything to do with it. It is almost exclusively the framework upgrade. The same upgrade that increased world save times. That is another system that needs lots of little tweaks to modernize and work in harmony with modern operating systems.
 

Ardan

Neophyte
Benefactor
Supporter
1700442714815.png
What Krecha described happens also on my CUO client. A simple macro for using bandages is a failure. If another macro is used in the meantime, it automatically interrupts the process and I have the impression that it starts from the beginning. In addition, quite often the character suddenly stops and after a second releases but with a ping of over 400. I didn't have such situations before the changes. And it's not while saving the shard. Overall, lags is quite common now.
Sorry for my bad English
 

Krecha

Newbie III
Supporter
Code:
ServUO
09:10:33 Buff time in packet: 00:00:03.9963948
09:10:33 DateTimeNow: 20.11.2023 09:10:33
09:10:39 Buff time in packet: 00:00:04
09:10:39 DateTimeNow: 20.11.2023 09:10:39
09:10:45 Buff time in packet: 00:00:04
09:10:45 DateTimeNow: 20.11.2023 09:10:45
09:10:52 Buff time in packet: 00:00:04
09:10:52 DateTimeNow: 20.11.2023 09:10:52
09:11:01 Buff time in packet: 00:00:04
09:11:01 DateTimeNow: 20.11.2023 09:11:01
09:13:10 Buff time in packet: 00:00:04
09:13:10 DateTimeNow: 20.11.2023 09:13:10
09:13:14 Buff time in packet: 00:00:04
09:13:14 DateTimeNow: 20.11.2023 09:13:14
09:13:18 Buff time in packet: 00:00:04
09:13:18 DateTimeNow: 20.11.2023 09:13:18
Heri:
09:17:22 Buff time in packet: 00:00:03.9987929
09:17:22 DateTimeNow: 20.11.2023 09:17:22
09:17:26 Buff time in packet: 00:00:03.9991409
09:17:26 DateTimeNow: 20.11.2023 09:17:26
09:17:32 Buff time in packet: 00:00:03.9999780
09:17:32 DateTimeNow: 20.11.2023 09:17:32
09:17:36 Buff time in packet: 00:00:03.9999786
09:17:36 DateTimeNow: 20.11.2023 09:17:36
09:17:39 Buff time in packet: 00:00:03.9999716
09:17:39 DateTimeNow: 20.11.2023 09:17:39
09:17:44 Buff time in packet: 00:00:03.9999775
09:17:44 DateTimeNow: 20.11.2023 09:17:44
09:17:47 Buff time in packet: 00:00:03.9999690
09:17:47 DateTimeNow: 20.11.2023 09:17:47
09:17:51 Buff time in packet: 00:00:03.9999717
09:17:51 DateTimeNow: 20.11.2023 09:17:51

Probably the best solution would be to pass buff time as it is - without calculating the delay and when resending (pm.ResendBuffs) buff - recalculate the delay time.

But overall, it seems like it will only be a cover up to the general performance issue.
 
Last edited:

Dan

Staff Member
Administrator
Game Master
ah ha!

1000004532.jpg

So in .net framework timespan was AUTOMATICALLY rounded. In newer versions that changed. If I apply a simple rounding I think it fixes everything.
 

Dan

Staff Member
Administrator
Game Master
What is cool about the .NET is that it, like TrueUO, is entirely open source.


I wonder where else TrueUO is using TimeSpan, that used to depend on it auto rounding, that needs to be looked at.
 

Dan

Staff Member
Administrator
Game Master
fix.png
The first number 3.999 was before adding the code in red.
The second number 4 was after adding the code in red.

This will only fix issues that are directly related to incorrect buff icon times.

@BBB I am going to need you to go into more detail on what your macros are doing so I can see if they invoking methods that used to rely on TimeSpan auto-rounding and now need to be specifically told to round.

@Krecha thanks a lot! You were a huge help here in narrowing this down. I am going to push this fix to Heritage later on today. It is being pushed to the TrueUO git now if you want to test.
 

Dan

Staff Member
Administrator
Game Master
Changes have been pushed. Please provide any revised feedback.
 
OP
BBB

BBB

Novice
The Legend
Benefactor
Supporter
@BBB I am going to need you to go into more detail on what your macros are doing so I can see if they invoking methods that used to rely on TimeSpan auto-rounding and now need to be specifically told to round.
Mostly various bandage healing macros, based on buff timers. Actually, looks like it's working again. However, i still feel like there is something else, like whole server lag spikes. Do you guys had similar experiences or is it just me? :rolleyes:
 
Last edited:

Ardan

Neophyte
Benefactor
Supporter
Mostly various bandage healing macros, based on buff timers. Actually, looks like it's working again. However, i still feel like there is something else, like whole server lag spikes. Do you guys had similiar experiences or is it just me? :rolleyes:
Short stops happen from time to time, followed by a high ping for 2-3 seconds. But I live in Europe, so ping spikes are not necessarily the server's fault.
 

PLAY NOW

Heritage

Address
play.trueuo.com
Port
2593
Uptime
12 hours
Players Online
10
Houses
850
Vendors
293
Gold
5,088,158,703gp
Top Bottom