Closed jacobwegner closed 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
https://spike-apollo--explorehomer-dev.netlify.app/reader?urn=urn%3Acts%3AgreekLit%3Atlg0012.tlg001.perseus-eng4%3A2.480-2.840
Reduce nested queries
closed in favor of #57
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