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

Rewrite database importer to work in memory #14

Open
jlnr opened this issue Jul 19, 2016 · 2 comments
Open

Rewrite database importer to work in memory #14

jlnr opened this issue Jul 19, 2016 · 2 comments

Comments

@jlnr
Copy link
Member

jlnr commented Jul 19, 2016

Instead of downloading the full Wikipedia dump, extracting it, then running a ragel script over the XML file, can we just do it all in memory? Pseudocode: curl -s http://dumps.wikimedia.org/.../enwiki-20170220-pages-articles-multistream.xml.bz2 | bzcat | ./extract-movies enwiki?

Rationale: Having 100 GB of free space is a rare occurence for me.

@jlnr
Copy link
Member Author

jlnr commented Feb 28, 2017

Update: This is now possible because I've replaced the ragel script with a little C++ tool that is capable of streaming.

It is also slower by a factor of 10, taking 33 instead of 3 minutes to process the zhwiki dump. If the enwiki script can finish over night (<8h), that's still good enough.

@jlnr
Copy link
Member Author

jlnr commented May 22, 2017

It all works in memory now, you just need to set EN_DATE/ZH_DATE. The final step would be to automatically determine the latest dump date via the JSON status files (https://dumps.wikimedia.org/enwiki/20170501/dumpstatus.json etc)

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