-
Notifications
You must be signed in to change notification settings - Fork 7
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
Speeding up inserts #88
Comments
The datamodel is not at all suited to what we're doing now, and it starts to seem like a mistake to not have modified it earlier. However, one rather small change we could do that I think would speed up things is this: Instead of storing Media as separate objects and just linking to them from the Work, they could be stored as subdocuments directly in the Work.media array. This will not allow the fancy forking etc we planned originally, but that's not needed as long as we only work with pre-existing collections. Later, we could revert to supporting both embedded and linked Media if necessary. The createWork function in the core module should also allow all annotations and media objects to be included directly. I.e. the load script can then build up a complete Work object with all annotations and media subobjects in it, and then just make one call to push this into mongo rather than as now adding each annotation and media one by one. |
Better idea: let the load script modify the database directly, since we can't yet use the events generated by the core module anyway:
|
|
At present, it seems the load script only deals with ~1,5M works per day, which means that with a hashing rate of at least 3M per day, the load script will never catch up and just get more and more out of sync.
What can we do to speed up loading massively? @artfwo has suggested loading in parallel. @petli would appreciate your thoughts on this if you have some bandwidth soon?
The text was updated successfully, but these errors were encountered: