scaife-viewer / explorehomer

front-end for the Scaife "Explore Homer" prototype
https://scaife-viewer.org/
MIT License
4 stars 0 forks source link

Improve performance through client-side shaping #54

Closed jacobwegner closed 4 years ago

jacobwegner commented 4 years ago

As we continue to dig in to performance issues for EH, I've noticed that this type of response gets really heavy:

https://tinyurl.com/eh-perf-1

By splitting out the nested loop for named entities, we can cut the query time in half:

https://tinyurl.com/eh-perf-2

There is still some shaping to be done on the queries (so we don't get tokens that aren't relevant to a particular passage, for example), but I like how this came out:

https://perf-data-shaping--explorehomer-dev.netlify.app/reader?urn=urn%3Acts%3AgreekLit%3Atlg0012.tlg001.perseus-eng4%3A1.1-1.160

vs

https://spike-apollo--explorehomer-dev.netlify.app/reader?urn=urn%3Acts%3AgreekLit%3Atlg0012.tlg001.perseus-eng4%3A1.1-1.160

and

https://perf-data-shaping--explorehomer-dev.netlify.app/reader?urn=urn%3Acts%3AgreekLit%3Atlg0012.tlg001.perseus-eng4%3A2.480-2.840

vs

https://spike-apollo--explorehomer-dev.netlify.app/reader?urn=urn%3Acts%3AgreekLit%3Atlg0012.tlg001.perseus-eng4%3A2.480-2.840

jacobwegner commented 4 years ago

Reduce nested queries

jacobwegner commented 4 years ago

closed in favor of #57