Enhancing Subgraph Indexing: Reduce eth_calls for Better Performance


Enhancing Subgraph Indexing: Reduce eth_calls for Better Performance


Terrill Dicki
Nov 16, 2025 16:47

Discover how reducing eth_calls can significantly boost subgraph indexing performance, as shared by The Graph Protocol’s new best practices series.

In the latest insights from The Graph Protocol, a straightforward yet impactful tip has been shared to enhance subgraph indexing performance: reducing eth_calls. This advice comes as part of their newly launched ‘Best Practices in Subgraph Development’ series, which aims to guide developers in optimizing their subgraph development processes.

Understanding the Importance of Reducing eth_calls

Subgraphs, which are decentralized open-source APIs, play a crucial role in the Web3 stack by enabling developers to create fast front ends for decentralized applications (dapps). However, as usage increases, so does the need for efficiency. A common challenge is the slow indexing performance due to excessive eth_calls, which are calls to access smart contract states through JSON RPC. These calls can delay operations significantly, often taking from 100 milliseconds to several seconds to resolve, according to The Graph.

Strategies for Optimization

To address this, developers are encouraged to minimize eth_calls. One effective strategy is to cache the results of these calls and store them in the subgraph, thus avoiding repeated calls for data that has already been retrieved. Additionally, leveraging event data from smart contracts and calculating necessary information directly within the subgraph can further reduce reliance on eth_calls.

Practical Application

An example provided by The Graph involves an NFT subgraph tracking token mints and metadata. Instead of making eth_calls for each transaction to fetch contract details like name and symbol, developers can optimize by caching these details after the initial call. This approach not only reduces unnecessary calls but also significantly speeds up the indexing process.

Continued Advancements

As technologies such as Firehose and Substreams continue to evolve, The Graph Protocol is committed to enhancing the performance and capabilities of decentralized data management. The optimization of eth_calls is a step towards more efficient and responsive dapps, benefiting developers and end-users alike.

For more detailed insights and to explore further best practices in subgraph development, visit the full article on [The Graph Protocol](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/).

Image source: Shutterstock




Source link