Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async command map building #3116

Merged
merged 1 commit into from
Apr 12, 2020
Merged

Async command map building #3116

merged 1 commit into from
Apr 12, 2020

Conversation

perseus5
Copy link
Contributor

@perseus5 perseus5 commented Apr 9, 2020

Builds the command map async, focuses on fixing the root problem described in #2938 instead of just ignoring it. Leaf said he had a better idea but since I had this finished already.. thought might as well PR it.

Needs testing from someone who suffers from lag spikes when players connect/change worlds.
Shows up as CommandDispatcher.a() in sampler reports.

@aikar
Copy link
Member

aikar commented Apr 9, 2020

Impl looks perfectly fine to me. is it running fine for you behaviorally? Tested with a plugin using the event?

@perseus5 perseus5 marked this pull request as ready for review April 10, 2020 07:02
@perseus5
Copy link
Contributor Author

Had someone test it, looks like it broke tab complete completely. no errors in console either. https://i.gyazo.com/1c9616a53411e3acd73159de77a159ef.png

Guess it's not possible?

@electronicboy
Copy link
Member

I did actually wanna look into this a while back, but there was a thing or two which I'd figured I'd have to look into, but it's doable

@perseus5
Copy link
Contributor Author

As Billy pointed out, I was using submit instead of execute for the async task. Issue still persisted, but I also noticed that I was using postToMainThread for the sync task. That method does not do as the name suggests, so that has also been changed to execute. After testing, it looks like these were the correct changes as it retains the same functionality as before, just now off the server thread.

Reduces lag created on login and world change for sending the command map to client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants