spark-viewer
spark-viewer copied to clipboard
`/tick warp`/`tick sprint` during a spark profile can cause TPS values to overflow their container
To reproduce:
- Install Minecraft 1.20.1 or 1.20.4.
- Install Fabric Loader 0.14.7.
- If you installed Minecraft 1.20.1, install Spark 1.10.53 (https://modrinth.com/mod/spark/version/1.10.53-fabric). If you installed Minecraft 1.20.4, install Spark 1.10.58 (https://modrinth.com/mod/spark/version/1.10.58-fabric).
- If you installed Minecraft 1.20.1, install Carpet Mod (https://modrinth.com/mod/carpet/version/1.4.112).
- Start Minecraft.
- Create a new Superflat world, using "The Void" preset.
- For best results, set
randomTickSpeed
to 0, disable spawn chunks and mob spawning, and reduce your render and simulation distances as low as possible. - Run
/tick warp 7200000
(1.20.1) or/tick sprint 360d
(1.20.4). - Run
/spark profiler start
, then wait at least 1 minute. - Run
/spark profiler stop
. - Check the resulting profile. If there are TPS values greater than 1,000, they overflow the container, as shown below.
An example profile with such TPS values is attached: https://spark.lucko.me/sXEWUwiWC8 (local copy attached: sXEWUwiWC8.zip)
A possible solution would be to truncate TPS values over 1,000 to the nearest integer, or rewrite the viewer GUI to dynamically adjust the size of the container holding the TPS values based on how large they are.