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

Client-only spread is incredibly inefficient. causes visible lockups. #119

Open
JaSpr opened this issue Jul 1, 2018 · 4 comments
Open
Labels
enhancement New features or improvements to existing features help wanted Pull Requests for this issue are encouraged

Comments

@JaSpr
Copy link

JaSpr commented Jul 1, 2018

I've had this issue on multiple servers where I am only running the mod locally. The algorithm being used to spread and balance the grid could use some work. Sometimes, I've had the game physically lock up and have to be force quit, but that doesn't happen much anymore (in 1.12.2). Lately, it just locks up for a couple of seconds.

That said, I think the algorithm just needs some refactoring. I was hoping to work on it today, but when I run the client through gradle, then connect to a local vanilla server, the crafting tweaks buttons don't actually do anything, so I'm unable to test out any improvements.

@BlayTheNinth
Copy link
Member

Yeah, I think I remember thinking it's crazy inefficient but was lazy at the time (since the client-only implementations are less frequently used). I'm busy with other stuff right now but if I remember correctly it's placing items one by one when it could just make use of Vanilla's inbuilt spreading.

As to why it won't work on a Vanilla server, I don't know. It should only enable server-side mode if the server claims to have Crafting Tweaks installed during handshake (which shouldn't even be possible since that handshake doesn't happen on Vanilla).

I've always just set the TEST_CLIENT_SIDE boolean in CraftingTweaks.java to true, that way it's possible to test without running a server at all.

@JaSpr
Copy link
Author

JaSpr commented Jul 2, 2018

Thanks! I'll take a look.

On a side note, why is server-side instant?

@BlayTheNinth
Copy link
Member

Server-side doesn't have to rely on actual slot movements and can manipulate stacks in slots directly, which can be done in one go and doesn't require any communication until after everything is already done. Client-side would also feel instant if implemented in a non-lazy way, since it'd be one packet then instead of [way too many].

@BlayTheNinth BlayTheNinth added the bug Something isn't working as expected label Jul 26, 2018
@BlayTheNinth BlayTheNinth self-assigned this Jul 26, 2018
@BlayTheNinth BlayTheNinth added enhancement New features or improvements to existing features and removed bug Something isn't working as expected labels May 27, 2020
@BlayTheNinth BlayTheNinth removed their assignment Jun 23, 2020
@BlayTheNinth BlayTheNinth added the help wanted Pull Requests for this issue are encouraged label Sep 26, 2020
@BlayTheNinth BlayTheNinth added bug Something isn't working as expected 1.16 and removed enhancement New features or improvements to existing features labels Dec 9, 2021
@BlayTheNinth BlayTheNinth moved this to Ready for Development in Issues Jul 1, 2022
@EGOIST1372
Copy link

does this happen in 1.19.x as well or no?
I always check mods github before installing them so I won't encounter compatibility or errors or crashes ...
so just curious if it still present in 1.19.x versions as well?
thanks in advance <3

@BlayTheNinth BlayTheNinth moved this from 🎯 Ready for Development to 📝 Planning in Issues Dec 6, 2023
@BlayTheNinth BlayTheNinth moved this from 📝 Planning to 🎯 Ready for Development in Issues Dec 28, 2023
@BlayTheNinth BlayTheNinth added Minecraft 1.20 Issues occurring in Minecraft 1.20.x and removed Minecraft 1.20 Issues occurring in Minecraft 1.20.x labels Feb 16, 2024
@BlayTheNinth BlayTheNinth added enhancement New features or improvements to existing features and removed bug Something isn't working as expected labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements to existing features help wanted Pull Requests for this issue are encouraged
Projects
Status: 🎯 Ready for Development
Development

No branches or pull requests

3 participants