Terrill Dicki
Nov 16, 2025 16:47
Uncover how decreasing eth_calls can considerably increase subgraph indexing efficiency, as shared by The Graph Protocol’s new finest practices sequence.
Within the newest insights from The Graph Protocol, an easy but impactful tip has been shared to boost subgraph indexing efficiency: decreasing eth_calls. This recommendation comes as a part of their newly launched ‘Greatest Practices in Subgraph Growth’ sequence, which goals to information builders in optimizing their subgraph growth processes.
Understanding the Significance of Lowering eth_calls
Subgraphs, that are decentralized open-source APIs, play a vital position within the Web3 stack by enabling builders to create quick entrance ends for decentralized purposes (dapps). Nonetheless, as utilization will increase, so does the necessity for effectivity. A standard problem is the sluggish indexing efficiency attributable to extreme eth_calls, that are calls to entry good contract states via JSON RPC. These calls can delay operations considerably, typically taking from 100 milliseconds to a number of seconds to resolve, in keeping with The Graph.
Methods for Optimization
To deal with this, builders are inspired to reduce eth_calls. One efficient technique is to cache the outcomes of those calls and retailer them within the subgraph, thus avoiding repeated requires knowledge that has already been retrieved. Moreover, leveraging occasion knowledge from good contracts and calculating essential info straight inside the subgraph can additional cut back reliance on eth_calls.
Sensible Utility
An instance supplied by The Graph entails an NFT subgraph monitoring token mints and metadata. As an alternative of creating eth_calls for every transaction to fetch contract particulars like identify and image, builders can optimize by caching these particulars after the preliminary name. This strategy not solely reduces pointless calls but in addition considerably hurries up the indexing course of.
Continued Developments
As applied sciences equivalent to Firehose and Substreams proceed to evolve, The Graph Protocol is dedicated to enhancing the efficiency and capabilities of decentralized knowledge administration. The optimization of eth_calls is a step in the direction of extra environment friendly and responsive dapps, benefiting builders and end-users alike.
For extra detailed insights and to discover additional finest practices in subgraph growth, go to the total article on [The Graph Protocol](https://thegraph.com/weblog/improve-subgraph-performance-reduce-eth-calls/).
Picture supply: Shutterstock

