In my dapp, I am calling contract.allEvents({from: 0, to: 'latest'}.

I am doing this for every user and every time they first enter the site.

Is this scalable? What if my contract gets to 1 million events? How long will take take to load? Are those 1 million individual requests?

Should I use web3.eth.filter instead?

I like the simplicity of allEvents over the "topics" method of filter but if it doesn't scale I guess I would have to change.

1 Answer 1


When you call contract.allEvents, you will get receive events like data, changed, etc..,. Events will use storage as log's. I am not very sure how much time it will take to load in main network. Where is case of my local dev net I am getting 3-5 events for 1 sec.

Any how we will not load all 1 million events in a single page. We will use pagination to render 1 million req.

So I'll recommend use from and to block numbers for retrieve an events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.