You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 28, 2020. It is now read-only.
setup.py ... -gX is extremely quiet and incredibly slow. In an attempt to load all three levels of the sample data -- which is a totally reasonable thing to do that probably everyone who works on district builder will end up doing -- I've had it running for 20 minutes now and it's still going. That's not acceptable.
start a timer when you run: select count(1) from redistricting_geounit;
wait thirty seconds
run that sql command again
observe how many records have been inserted
note privately that there are OVER 9,000 (I have no idea how many but it is more than 9,000) records that will be inserted
also note that the command gives you no indication that it's doing anything, and that if you didn't know where to look in the database to watch the record count increase, you'd have to fall back on checking cpu utilization in the django container to confirm that anything is going on, which is bad
😢
Expected Behavior or Output
Loading development data should take under twenty minutes. I think there's an easy win here -- instead of going geounit by geounit, checking what we need to do, and saving each one, we could build an array of geounits and insert them all at once. That would be risky for a file coming in from Somewhere Else in the Universe:tm:, but it's fine for a known well-formatted source.
Problem Description
setup.py ... -gXis extremely quiet and incredibly slow. In an attempt to load all three levels of the sample data -- which is a totally reasonable thing to do that probably everyone who works on district builder will end up doing -- I've had it running for 20 minutes now and it's still going. That's not acceptable.Replication Steps
docker-compose exec django ./manage.py dbshellselect count(1) from redistricting_geounit;Expected Behavior or Output
Loading development data should take under twenty minutes. I think there's an easy win here -- instead of going geounit by geounit, checking what we need to do, and saving each one, we could build an array of geounits and insert them all at once. That would be risky for a file coming in from Somewhere Else in the Universe:tm:, but it's fine for a known well-formatted source.