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

Import optimizations #12

Closed
jpmckinney opened this issue Sep 18, 2013 · 1 comment
Closed

Import optimizations #12

jpmckinney opened this issue Sep 18, 2013 · 1 comment

Comments

@jpmckinney
Copy link
Owner

(If the current algorithm proves to run too slowly)

If foreign objects are present:

  • When dumping JSON objects, put the index in the filename, so that import order can match scraper order
    • e.g. if scraping an org. hierarchy with foreign objects, preserving order will ensure parents are imported first
  • Create a dependency graph anyway and use it as a best-guess initial order
    • based on assumption that real-world input will be far from worst-case input
  • Perform foreign object resolution against both the DB and the unimported objects
    • would need to use a unique temporary collection
  • Add more information (what info?) to the models so that a reasoner can better plan the import
    • ... reasoning is hard ...
@jpmckinney
Copy link
Owner Author

So far, it's been possible to use foreign keys instead of foreign objects to avoid slow foreign object resolution.

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

No branches or pull requests

1 participant