Random tick spikes
MinecraftCitiesNetwork opened this issue ยท 5 comments
Not much information I've gathered really apart from that there is an operation that is being done on the main thread that is causing tick spikes.
Here's a spark report - https://spark.lucko.me/CXztgE4j5m
Hopefully it helps
Apologies for the very long delay, but it looks to be solved now! Thank You for the support :)
I've shared the report to a user from the Airplane Discord Server (https://discord.gg/rEjXmM7xMW) who says:
The proper optimization for this is to run the method async.
Either provide the completed data to the map with reflection or add a patch to a custom fork (or pr one to paper) that adds the API to do it.
Yeah, I noticed this issue when loading a bunch of maps at once before but didn't consider it too critical of a problem yet since it's only executed once per map when they are loaded (so, ideally, mostly during or shortly after server start).
I'll look into a solution for this. :)
The next update will offload the conversion from RGB to Minecraft colors to an async task, reducing the performance impact of loading maps.
You might still encounter some lag spikes when loading very large numbers of maps at once (enough to tank client FPS anyways). This can't really be avoided without a much more sophisticated approach (maybe for 1.1).
The next update will offload the conversion from RGB to Minecraft colors to an async task, reducing the performance impact of loading maps.
You might still encounter some lag spikes when loading very large numbers of maps at once (enough to tank client FPS anyways). This can't really be avoided without a much more sophisticated approach (maybe for 1.1).
Awesome! That's totally understandable, do you know when we can expect the next update?
EDIT: I see it pushed now! Thanks :o