Skip to content
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

Performance improvements #64

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Performance improvements #64

wants to merge 4 commits into from

Conversation

GabrielCamba
Copy link
Contributor

Based on this article from Edge & Node people I worked on this for improving the performance of our subgraph.

This includes immutable entities and using Bytes as the id of entities. The two features are independent of each other; immutable entities only require a small change to the subgraph schema, while using byte strings as the id also requires small changes to the mappings.

Both of these enhancements will improve indexing speed, reduce the amount of data that needs to be stored for a subgraph, and also speed up some queries.

Due to the changes I already made I deployed this here and tested the affected entities to check if the information is still right. The information seems to be ok.

I need to perform an indexing speed test comparing it with the previous version. To perform this test I will remove a prop in both subgraphs (not crucial, just for making it index again) and I will query how many blocks are indexed in 10 minutes on different parts of the indexing progress for being able to decide if the change makes sense. Besides that, there should be improvements on some queries.

Close #54

@GabrielCamba
Copy link
Contributor Author

I already tried to test it I deployed previous version and this one. I've found previous version is way faster I think could be related to hosted service, because it doesn't make any sense.
Previous version deploy for testing is here and this version is here

Both started almost at the same time
Prev version:

  • 10171 blocks indexed in 10 min
  • 129356 blocks indexed in 2 h
  • 13119023 blocks indexed in 12 h

This version:

  • 3711 blocks indexed in 10 min
  • 7084 blocks indexed in 2 h
  • 141027 blocks indexed in 12 h

Those are the numbers I calculated, Can't find a way to determine how faster is this version on indexing.

@GabrielCamba GabrielCamba self-assigned this Sep 27, 2022
Base automatically changed from upgradeGraphVersionFix to develop September 27, 2022 12:31
Copy link

@ramirotw ramirotw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GabrielCamba

  1. have you found the reason why the indexing time was actually much worse with the improvements? is there a way to compare the two instances in a more deterministic way? Or basically any test depends on the hosted service hardware they randomly assign to you?
  2. have you found any difference on the data?

@GabrielCamba
Copy link
Contributor Author

GabrielCamba commented Oct 19, 2022

  1. have you found the reason why the indexing time was actually much worse with the improvements? is there a way to compare the two instances in a more deterministic way? Or basically any test depends on the hosted service hardware they randomly assign to you?

I couldn't find any deterministic way of report the performance improvement.

  1. have you found any difference on the data?

No I haven't. There are a few id's changed, but this shouldn't represent any conflict on your side.
I removed a couple of properties because there are the same as the ID, and It doesn't make any sense to have data repeated.

@GabrielCamba GabrielCamba requested a review from ramirotw October 19, 2022 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if we can add indexing improvements.
2 participants