harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
36 stars 30 forks source link

Drop expensive queries from contentnode admin #1924

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

This should vastly improve the speed of the ContentNode admin page such that it becomes useful—at the moment the list page just times out on prod.

Removes two very expensive queries:

Also adds two fields on the change page that were probably omissions: resource_id and resource_type. They were listed in readonly_fields, but those values have no effect if they aren't also in fields. (This behavior of Django's is silly.)

lizadaly commented 1 year ago

c.f. https://github.com/harvard-lil/h2o/issues/1540