-
Notifications
You must be signed in to change notification settings - Fork 19
transaction performance #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- ensure the transactions are ordered after grouping
There was a problem hiding this comment.
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 aims to improve transaction performance by consolidating multiple transaction queries into a single query and removing redundant API endpoints. Key changes include:
- Replacing combined search queries with a single getTransactions call in Transactions.tsx.
- Updating the Transaction page to use getTransactions with a unified search parameter.
- Removing deprecated bindings and command registrations for get_transactions_by_item_id and get_transaction.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/pages/Transactions.tsx | Simplified transaction fetching by removing separate search queries. |
src/pages/Transaction.tsx | Updated transaction retrieval to use a single query response. |
src/bindings.ts & src-tauri/src/lib.rs | Removed deprecated API bindings and command registrations. |
crates/sage/src/endpoints/data.rs | Modified grouping and transaction coin processing logic. |
crates/sage-database/src/coin_states.rs | Revised SQL query and helper logic to support the consolidated query design. |
Files not reviewed (1)
- crates/sage-api/endpoints.json: Language not supported
Comments suppressed due to low confidence (3)
src/pages/Transactions.tsx:57
- The previous logic that merged search-based transaction queries has been removed in favor of a single query. Please confirm that this change is intentional, as it may impact advanced search features previously available on the transactions page.
setTransactions(result.transactions);
crates/sage/src/endpoints/data.rs:838
- Ensure that the 'derivation_count' field is consistently included in all transaction coin queries; its absence could lead to unexpected behavior when determining the AddressKind.
let derivation_count: Option<u32> = transaction_coin.get("derivation_count");
crates/sage-database/src/coin_states.rs:483
- The new filtering logic in the SQL query now handles asset ID and address validations. Verify that all edge cases are covered and that the performance of the query has been validated with these changes.
if is_valid_asset_id(value) {
Get transactions and coins in a single query