DDMAL / DDMAL/docker-simssadb

Startup fails - adding sample files to database is orders of magnitude slower than normal

Open
#2 2 comments 0 reactions 3 assignees Claimed by @malajvan View on GitHub
Dominant language
Shell
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Upon building the images here and running `docker-compose up`, the first thing that the `django` container will do is to run this script: https://github.com/DDMAL/docker-simssadb/blob/master/django/scripts/start.

This script prepares the postgres database and also adds a bunch of sample data from the [sample_data_for_SIMSSA_DB](https://github.com/DDMAL/sample_data_for_SIMSSA_DB) repository. All of the data must be added before `gunicorn` can be started, which allows access to the django site. However, this sample data is added incredibly slowly - it seems features are extracted from the symbolic music files one at a time, and this process is taking around thirty seconds per file, which is _far_ more than it should be (Cory cited that it should take a second or two). The site may come up eventually, but at least one time when I tried without first modifying the `start` script to not add all the files, this process appeared to just hang forever.

We need to find out why it's taking so long to add files. The scripts that are taking a long time are in each of the folders of the sample data repo; I see nothing in that raw python code that should run in more than a fraction of a second per file. Perhaps database updates are taking too long for some reason and this is a Django problem.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.