Skip to content

Lag due to Folia Scheduler on papermc server #47

@DarkChromaMC

Description

@DarkChromaMC

Issue: Unnecessary lag caused by multi-threaded scheduling on Folia
Description:
When running on a Folia server, GeyserModelEngine schedules tasks across ALL available CPU threads, which causes significant and unnecessary lag. This behavior is resource-intensive and does not provide any benefit in this context.

Expected Behavior:
The plugin should detect when it's running on Folia and limit its use of threads accordingly

Additional Note:
If the server is running on PaperMC (not Folia), the plugin should fall back to a simpler, more efficient scheduling method. The current scheduling logic is overly expensive for no reason and should be avoided on Paper-based servers

Suggested Fix:
Add conditional logic to detect the server type (Folia vs Paper) and adjust the scheduling strategy accordingly to reduce CPU overhead

Image https://spark.lucko.me/SNs6IqscSd?hl=13470

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions