Skip to content

Imporove loads with large item counts - #11

Merged
airbreather merged 1 commit into
airbreather:mainfrom
DrAwesome4333:large-item-count-performance
Oct 22, 2026
Merged

airbreather merged 1 commit into
airbreather:mainfrom
DrAwesome4333:large-item-count-performance

Conversation

@DrAwesome4333

@DrAwesome4333 DrAwesome4333 commented Oct 22, 2026 •

Copy link
Copy Markdown

This PR makes a small change to improve performance while handling the receivedItems packet.

While testing this with a slot with ~83K recieved items, this what I found.
Over 400ms of load time was spent on this one line shifting the array.
Screenshot From 2026-10-21 23-05-30

After the change, the time for the whole function call dropped to below 6ms
Screenshot From 2026-10-21 23-07-11

Tested by using a web-app to connect to a locally hosted server, with a slot with over 83K items while running Chrome's profiler.

@airbreather
airbreather merged commit c0fad70 into airbreather:main Oct 22, 2026
1 check passed
airbreather added a commit that referenced this pull request Oct 22, 2026
- #10 - fix an incorrect merge conflict resolution that was done in #3
- #11 - fix a performance issue seen when receiving MANY items at once (e.g., at the initial handshake step for a game that's been going on for a while).
- Routine package version updates.

Changes related to those version updates:
- Add a `@throws` bit that had been missed by an earlier version of the `jsdoc/require-description` ESLint rule.
- Targeted fix for `dts-bundle-generator` neither accepting TypeScript v7 nor including an upper bound in the version range in its own `package.json`.
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