#(vexoi) Tab completion item IDs causes server TPS drop

1 messages · Page 1 of 1 (latest)

umbral creek
#

Hi there, I have made a command script that the first parameter has to be any Minecraft item ID.

The autocomplete attribute looks like so

        1: <server.material_types.parse[name]>```

However, everytime someone on the server uses the tab auto complete, it causes great TPS drops, is there a better way of getting all item ID names?
noble flowerBOT
#

(vexoi) Tab completion item IDs causes server TPS drop

#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

glacial cipher
#

That should be fine

#

!spark

verbal sableBOT
# glacial cipher !spark
Info: spark

The "timings" system within Spigot/Paper is incredibly inaccurate for use with Citizens, and cannot be used to diagnose any issues related to Citizens. It notably blames Citizens for a significant amount of entity-related lag (that isn't in any way caused by Citizens).

For accurate timings, you need a Java profiler. There are a variety of profiler options (WarmRoast, YourKit, VisualVM, ...), but the simplest to use on a Spigot server is a plugin named "Spark" that embeds WarmRoast, which you can find here: https://www.spigotmc.org/resources/spark.57242/.

To get a spark report, type /spark profiler start, then replicate lag issues (for no more than about a minute), then /spark profiler stop, and post the link it gives you.

glacial cipher
#

Could you provide a spark report?

naive zinc
#

this is huge data

#

!t static

verbal sableBOT
# naive zinc !t static

Forces the tag inside to static-parse.
That is, any value, no matter how dynamic, will parse only exactly once at reload time.

Returns

ObjectTag

Examples
# This example will narrate the same number every time it's ran, until "/ex reload" is used.
- narrate <static[<util.random_decimal>]>
naive zinc
#

It will lag only the first time after /reload

glacial cipher
#

@umbral creek Do you have debug enabled?

umbral creek
glacial cipher
#

no it's true by default

#

If debug enabled that may cause lags yes

#

becaues it prints out everything into console

#

Should set debug: false on scripts that you finished

#

And if it still causing lags, please provide the script and a spark report.

#

!info paste spark

verbal sableBOT
#
Info: spark

The "timings" system within Spigot/Paper is incredibly inaccurate for use with Citizens, and cannot be used to diagnose any issues related to Citizens. It notably blames Citizens for a significant amount of entity-related lag (that isn't in any way caused by Citizens).

For accurate timings, you need a Java profiler. There are a variety of profiler options (WarmRoast, YourKit, VisualVM, ...), but the simplest to use on a Spigot server is a plugin named "Spark" that embeds WarmRoast, which you can find here: https://www.spigotmc.org/resources/spark.57242/.

To get a spark report, type /spark profiler start, then replicate lag issues (for no more than about a minute), then /spark profiler stop, and post the link it gives you.

glacial cipher
#

If you're using it somewhere it already caches

umbral creek
#

Thank you so much, setting debug to false fixed the TPS drops!

patent anvil
#

with static its even faster

umbral creek
#

Static?

#
        1: <static[<server.material_types.parse[name]>]>```
#

^Like so?

patent anvil
#

<static[<server.material_types.parse[name]>]>

#

ye

umbral creek
#

Okay yeah thank you so much!