Skip to content

fix(harper.js): slow message passing from slow cache lookups#3588

Merged
elijah-potter merged 2 commits into
masterfrom
work-count-bug
Jun 4, 2026
Merged

fix(harper.js): slow message passing from slow cache lookups#3588
elijah-potter merged 2 commits into
masterfrom
work-count-bug

Conversation

@elijah-potter
Copy link
Copy Markdown
Collaborator

Issues

Fixes #3577

Description

This PR fixes a WorkerLinter performance regression that affected integrations using inlined WASM binaries, including the Obsidian plugin.

SuperBinaryModule.getBinaryModule() now reuses the existing lazy BinaryModuleImpl.inner promise instead of calling back into loadBinary(...) on every access. This avoids repeatedly constructing a new cache key from the full inlined WASM data URL, which is very large for slimBinaryInlined.

This construction and subsequent comparison was really slow and it was happening every time a message was passed between the WorkerLinter and the main thread. This resulted in large, noticeable, and persistent lag.

How Has This Been Tested?

Manually

AI Disclosure

  • I am a human and didn't use any AI.
  • I used LLM features of my editor, but not an agent.
  • I used an AI agent interactively.
  • I am an agent or I got an agent to do the work autonomously.

If Your PR Implements or Enhances a Linter

N/A

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

@elijah-potter elijah-potter added this pull request to the merge queue Jun 4, 2026
Merged via the queue into master with commit aca91e3 Jun 4, 2026
13 checks passed
@elijah-potter elijah-potter deleted the work-count-bug branch June 4, 2026 18:15
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.

Heavy Lag

1 participant