bentonam / fakeit

Generates JSON documents based on models defined in YAML and adds them to a Couchbase Bucket
MIT License
86 stars 21 forks source link

Update the document generation to be smarter. #102

Closed tjbenton closed 7 years ago

tjbenton commented 7 years ago

Currently when a model is added the model order gets updated, and then the documents are generated in order one by one.

We need to figure out which documents don't have any dependencies and then generate all of them at the same time. Then generate the documents that have dependencies in order 1 by 1.

Making this change should improve performance significantly.

tjbenton commented 7 years ago

This could cause problems with the new seed option. Might have to create a Documents class that creates a new Document on the build function. We will also need to figure out how to import Fakers main class instead of the function to create new instances of the Faker object.