Skip to content

Various perf improvements#425

Merged
ospfranco merged 10 commits into
mainfrom
various-perf-improvements
Jun 27, 2026
Merged

Various perf improvements#425
ospfranco merged 10 commits into
mainfrom
various-perf-improvements

Conversation

@ospfranco

@ospfranco ospfranco commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Various improvements to avoid work and fine-tuning, specially around inline functions on android.

Which makes this again the fastest lib on rn :) maybe not by much on functions that do not return anything but for sure on function calls that return data.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on performance-oriented refactors across the JS/TS wrapper and the native C++ bridge, aiming to reduce unnecessary work (notably around result materialization and argument handling) and to improve publish/release behavior for prerelease tags.

Changes:

  • Simplified JS-side DB wrappers and formatting updates, relying more directly on the native result shape (notably for executeSync).
  • Native-side tuning in C++ utilities/bridge (reduced allocations, early returns for empty rows, safer param handling).
  • Release workflow updated to publish prereleases under a dist-tag; examples/tests adjusted to match the new result behavior.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Storage.ts Formatting + minor safety tweak for sync row access.
src/functions.ts Wrapper refactor; executeSync now delegates directly to the host object.
README.md Updates benchmark image reference.
package.json JSON formatting + repository field normalized to object form.
example/src/tests/storage.ts Test description text changed.
example/src/tests/queries.ts Test updated to assume rows is always present.
example/src/performance_test.ts Adds an additional insert/select benchmark helper.
example/src/App.tsx Updates perf import and comments out the perf run block.
cpp/utils.cpp Micro-optimizations (moves, reserves) + faster empty-row handling.
cpp/DBHostObject.cpp Avoids treating null/undefined params as arrays in executeSync.
cpp/bridge.cpp Changes statement handling/allocation strategy; tracks affected rows/insert id during stepping.
.github/workflows/release.yml Publishes prereleases with a dist-tag based on tag suffix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cpp/bridge.cpp Outdated
@ospfranco ospfranco merged commit ca6e573 into main Jun 27, 2026
10 checks passed
@ospfranco ospfranco deleted the various-perf-improvements branch June 27, 2026 22:19
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