Jump to content

I would like to ask you about a possible performance issue with Waystones v1.1.4.

Pending 1.1.4

hid333
hid333

Posted

I would like to ask you about a possible performance issue with Waystones v1.1.4.

In my Rust PvE server logs, I repeatedly see warnings like the following:

Calling 'WaystoneConsoleCommand' on 'Waystones v1.1.4' took 590ms
Calling 'WaystoneConsoleCommand' on 'Waystones v1.1.4' took 588ms
Calling 'WaystoneConsoleCommand' on 'Waystones v1.1.4' took 596ms
Calling 'WaystoneConsoleCommand' on 'Waystones v1.1.4' took 587ms
Calling 'WaystoneConsoleCommand' on 'Waystones v1.1.4' took 584ms

These warnings appear repeatedly, and there were around 100 occurrences in the log I checked.

Since Oxide hooks normally run on the main server thread, I am concerned that a ~0.6 second execution time each time could potentially cause short server freezes or noticeable lag for players.

Could you please check whether this execution time is expected behavior?

If not, could you also check whether WaystoneConsoleCommand is performing any expensive operations, such as scanning many entities/players, rebuilding data, or doing synchronous file/data processing each time the command is called?

I would appreciate it if you could confirm whether there is anything that can be optimized.

Thank you very much.

ThePitereq

Posted

Hey.
Do you know which action exactly causes this issue? Like teleportation or UI clicking?
All things that could lag are secured after many checs and cached if possible.
The thing that could "lag" the most in the plugin is the spawnpoint search, but if plugin found one spawn point, it won't search for new one untl next plugin reload.
I didn't saw any performance issues on my side.

hid333

Posted

I see. Since the plugin doesn't perform any specific reloads, I had assumed the output was triggered by something like a search for all waystones whenever a player touches one.
I'll check later to see exactly when the output occurs.

  • Like 1
hid333

Posted

I investigated the Waystones performance issue more closely.

The repeated OnEntityTakeDamage took average ~1.1s warning appears to be misleading. The actual repeatable slow operation is WaystoneConsoleCommand, which consistently takes around 1.1–1.2 seconds when the issue occurs.

This seems strongly related to the teleport process rather than the damage hook itself.
 

The current teleport flow appears to perform several expensive operations in the same command execution: destination validation, teleporting, trigger/network group updates, clearing the entity queue, and finally forcing a complete player snapshot.

On my server, which has around 50 players and more than 115k server entities, forcing a complete network resync on every teleport may be especially expensive.

Could you please consider optimizing the teleport flow?

Possible improvements would be:

  • Avoid forcing a complete snapshot on every teleport unless it is actually necessary.
  • Use the minimum network updates required for a normal teleport.
  • Avoid clearing/rebuilding the player's entity queue unnecessarily.
  • Cache validated teleport positions more aggressively instead of repeating multiple physics/entity checks.
  • Add internal timing measurements for each teleport stage to identify exactly which operation causes the ~1.1s delay.
  • Reduce unnecessary globally networked decorative Waystone entities/lights where possible.

The goal would be to avoid doing all expensive teleport/network synchronization work synchronously inside a single UI command.

The OnEntityTakeDamage average warnings are probably a side effect of the accumulated Waystones execution time rather than the actual source of the delay.

I’ll leave the implementation approach to you, but I believe optimizing the teleport/network synchronization path could significantly reduce these server-wide micro-freezes.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.1m
Total downloads
Customers
12.2k
Customers served
Files Sold
172.8k
Total sales
Payments
3.8m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.