CenterForOpenScience / cos.io

https://www.cos.io
Apache License 2.0
28 stars 74 forks source link

[EOSF-703] Alter query on our team page for faster loading #899

Closed baylee-d closed 7 years ago

baylee-d commented 7 years ago

Ticket

https://openscience.atlassian.net/browse/EOSF-703

Purpose

The 'Our Team' page at https://cos.io/about/team/ is taking a long time to load. The main reason for this is because of the outrageously large query that's being run for each person being loaded.

Changes

The main change for this ticket was to filter the results being loaded based on their tags (ambassador, team, and alumn). Before, the query would loop through every person in the database and only display them if their tags were equal. With the changes in this ticket, the filtering is being done prior to the page being loaded, which takes out a lot of the render time.

Render time for the 'Our Team' page before changes:

screen shot 2017-07-12 at 9 37 06 am

After changes:

screen shot 2017-07-12 at 9 38 05 am