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

Improve taxonomy parser performance by serializing writes #249

Open
alexgarel opened this issue Sep 7, 2023 · 0 comments
Open

Improve taxonomy parser performance by serializing writes #249

alexgarel opened this issue Sep 7, 2023 · 0 comments

Comments

@alexgarel
Copy link
Member

The parser in parser/openfoodfacts_taxonomy_parser/parser.py create_nodes, creates nodes one by one, whereas it never makes a request to deduce what to create.

So instead of creating data one by one we should:

  • create a list of all the queries we need to run
  • batch run them

The same applies to create_child_link, where requests could be run in batch.

This might improve performance by a important factor.

One elegant way to do this kind of batch request is https://neo4j.com/docs/cypher-manual/current/clauses/unwind/, but I'm not sure we need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants