Skip to content

Add page on client performance, caching prepared statements - #566

Merged
benitav merged 4 commits into
mainfrom
client-performance
Aug 13, 2026
Merged

Add page on client performance, caching prepared statements#566
benitav merged 4 commits into
mainfrom
client-performance

Conversation

@simolus3

@simolus3 simolus3 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This adds a new page under the "Advanced" tab for Client SDKs covering performance analysis and tuning.

The troubleshooting section about the query performance timeline is now part of that page (the previous page now covers PowerSync service performance only, and links to the new page). The client performance page also describes steps we already apply in the SDK to optimize performance, ways to analyze client-side performance issues and to improve performance (throttling more aggressively for watched queries, high performance diffs, indexes for filters, raw tables). That page also mentions support for caching prepared statements.

AI use: Initial version written manually, then revised by Claude using the reviewing skills in this repo.

@mintlify

mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
powersync 🟢 Ready View Preview Aug 13, 2026, 1:32 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread client-sdks/advanced/performance-optimization.mdx
Comment thread client-sdks/advanced/performance-optimization.mdx Outdated
Comment thread client-sdks/advanced/performance-optimization.mdx Outdated
Comment thread client-sdks/advanced/performance-optimization.mdx Outdated
Comment thread client-sdks/advanced/performance-optimization.mdx Outdated
Comment thread debugging/troubleshooting.mdx Outdated
Comment thread debugging/troubleshooting.mdx Outdated
@benitav
benitav merged commit 9026410 into main Aug 13, 2026
4 checks passed
@benitav
benitav deleted the client-performance branch August 13, 2026 15:45
In both SDKs, each connection uses its own independent cache and the maximum size applies to those caches.
When the cache is full, the least-recently-used statement is evicted.

For more information, see the [documentation for JavaScript](https://powersync-ja.github.io/powersync-js/web-sdk/globals#preparedStatementsCache-1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I click on this link, it doesn't navigate to the right place in the api reference

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so cursed, it works for me but only when the page is cached (i.e. on the second open).

There is an <a id="preparedstatementscache-1"> on that page though, so I'm not sure why it wouldn't work.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah super cursed. Maybe as a workaround we just link here for now? https://powersync-ja.github.io/powersync-js/web-sdk/globals#webspecificopenoptions

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.

3 participants