Skip to content

Remove MovementCache - #147

Merged
windcolor-dev merged 7 commits into
Wind-Development:masterfrom
Falchus:remove-MovementCache
Aug 3, 2026
Merged

Remove MovementCache#147
windcolor-dev merged 7 commits into
Wind-Development:masterfrom
Falchus:remove-MovementCache

Conversation

@kalibrieren

Copy link
Copy Markdown
Contributor

No description provided.

@windcolor-dev

Copy link
Copy Markdown
Member

I feel like the movement cache is still a useful optimization. Did you notice anything particular that broke because of it?

@kalibrieren

kalibrieren commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

I feel like the movement cache is still a useful optimization. Did you notice anything particular that broke because of it?

These patches I'm removing are doing too much for too little/nothing, imo. So why clutter the MC server code more with classes like these?
Tested it, and the win in performance is negligible anyway - no real player will be able to tell.

@windcolor-dev

Copy link
Copy Markdown
Member

I agree in that it probably doesn't have as much impact as say, the multi-threaded entity tracker.

But I feel that it's best to keep these "micro" optimizations. (I believe this patch was more geared towards memory allocations rather than TPS)

If it broke something or ended up making performance worse/increasing memory allocation, it would make sense to revert it. But otherwise, I don't see any reason to

@kalibrieren

Copy link
Copy Markdown
Contributor Author

I agree in that it probably doesn't have as much impact as say, the multi-threaded entity tracker.

But I feel that it's best to keep these "micro" optimizations. (I believe this patch was more geared towards memory allocations rather than TPS)

If it broke something or ended up making performance worse/increasing memory allocation, it would make sense to revert it. But otherwise, I don't see any reason to

I don't think this will optimize memory much. If anything, it'll use more memory because we are caching and re-checking so often.

@windcolor-dev

Copy link
Copy Markdown
Member

You're right, I tested it and it never really activates. I believe this patch from NachoSpigot makes the MovementCache redundant

			// [Nacho-0019] :: We must move a meaningful amount of distance to tick
			// collisions
			if (d0 * d0 + d1 * d1 + d2 * d2 < 0.0001D) {
				return;
			}

@windcolor-dev
windcolor-dev merged commit 1123526 into Wind-Development:master Aug 3, 2026
2 checks passed
@kalibrieren
kalibrieren deleted the remove-MovementCache branch August 3, 2026 18:30
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.

2 participants