From 395e4a592dbb500503878ace0ccf94302cb3534b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 13:23:45 +0000 Subject: [PATCH 1/2] Initial plan From 17dacdb8772187b1af21ad81428786d5c7d69435 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 13:30:28 +0000 Subject: [PATCH 2/2] Document v2 optimisation feasibility notes Agent-Logs-Url: https://github.com/Cubicake/RaycastedAntiESP/sessions/13a802ab-c5f8-466a-8539-faeac3a1a908 Co-authored-by: Cubicake <70577278+Cubicake@users.noreply.github.com> --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index fcd3b193..82105514 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ The supported versions are 1.21.x PaperMC and Pufferfish. Other server versions ## Known issues: - Due to the nature of the plugin, there will be a short delay once an entity should be visible before it appears, causing it to appear like it "popped" into view. This issue is partially resolved by turning engine-mode to 2, and is worse for players with higher ping. +## v2 performance optimisation notes +- `AbstractBlockView#isBlockOccluding`: the hot path is the `ConcurrentHashMap` lookup with a new `ImmutableChunkSectionLocatable` allocated per ray step. A faster map is feasible only if we can avoid per-lookup allocations and keep thread-safety. Options include a per-world map keyed by a packed `long` for chunk section coords (reducing allocations), or a `ThreadLocal` mutable key for lookups. Fastutil primitive maps are not concurrent, so they would require synchronization or per-world locks that can erase the gains; benchmark before adopting. +- `AbstractBlockView#getNeedingRecheck`: this is inherently an O(n) scan over tracked tile entities. Avoiding it would require additional state (e.g., a priority queue keyed by next recheck tick) and extra updates whenever visibility/last-checked changes. That design is feasible but significantly more complex and should only be done if profiling shows the scan dominates. +- `PacketEventsBlockViewController#ingestChunkAndSetTileEntitiesToHiddenBlocks`: most cost comes from `BaseChunk#getBlockId` inside PacketEvents. From this repo we can only shave minor overhead (e.g., reducing allocations), but meaningful wins likely require PacketEvents exposing bulk palette access or faster block-state retrieval. + ## Versioning: Note that the following versioning information only applies to v2 and beyond.