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

Bundle pre-migrated empty database into installers to reduce load time #80

Closed
jamalex opened this issue Jul 2, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@jamalex
Copy link
Member

jamalex commented Jul 2, 2015

The first time the server is started, it takes a long time to load (see #78), and the longest-running task is the database migration. When the setup was run from the command line, at least the user saw that something was happening, but now it just seems like it's hanging.

If we can bundle a pre-migrated (but empty) database in (like we do in the Android app), this should cut down the load time very significantly. Steps to create such a database:

  • Delete any existing database
  • Run bin/kalite manage syncdb and then bin/kalite manage migrate --merge
  • Do not run setup, or start the server (as that will start adding data)
@benjaoming
Copy link
Contributor

This is a great idea! What about shipping it as a data file in the source directory? It seems useful to all new deployments...

@MCGallaspy
Copy link
Contributor

Now done in the KA Lite. See learningequality/ka-lite#4656. Empty db included if it exists, which it does if you build a distributable using our handy-dandy makefile.

@benjaoming benjaoming modified the milestones: 0.16.0, 0.15.0 Dec 8, 2015
@benjaoming
Copy link
Contributor

Just to clarify: This won't happen until 0.16, right? At least, that's how it is for the .debs where it's the ka-lite source dist that's responsible for this....

@MCGallaspy
Copy link
Contributor

Right.

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

4 participants