Skip to content

Optimize viewers() and hearers()#2537

Merged
wixoaGit merged 2 commits intoOpenDreamProject:masterfrom
wixoaGit:optimize_viewers
Mar 20, 2026
Merged

Optimize viewers() and hearers()#2537
wixoaGit merged 2 commits intoOpenDreamProject:masterfrom
wixoaGit:optimize_viewers

Conversation

@wixoaGit
Copy link
Member

These would loop through every existing mob in the game, which could be thousands. Now it queries RT for nearby mobs instead.

Paradise's NPC Pool subsystem was running slow because of several hearers() calls, this optimizes it somewhat.

@boring-cyborg boring-cyborg bot added the Runtime Involves the OpenDream server/runtime label Mar 20, 2026
@wixoaGit wixoaGit merged commit 7b15063 into OpenDreamProject:master Mar 20, 2026
19 checks passed
@wixoaGit wixoaGit deleted the optimize_viewers branch March 20, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Runtime Involves the OpenDream server/runtime size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant