Discussions

Ask a Question
Back to all

What is the best way to optimize performance when handling a large number of transactions or units through the TrustNote API?

To improve performance when working with many transactions, you should avoid making repeated single-unit lookups. Instead, use batch retrieval methods such as querying multiple units through indexed endpoints or caching recent results in your application. Keeping your device fully synced with the network also reduces lookup delays, since the API does not need to fetch missing branches. If your application processes real-time activity, subscribe to the event streams or WebSocket notifications rather than polling the API. This reduces server load and speeds up your response time. Finally, consider storing non-critical metadata on your own server and linking it to TrustNote unit IDs instead of embedding it directly, which keeps your payloads small and easier to process.