63a003af7f
The `story_get_all` function currently constructs a query which perfoms very poorly, making search in StoryBoard painful to the point of being almost unusable with only ~30000 stories in the database. There are a number of reasons for the poor performance, but the most impactful is the fact that we join two subqueries, one of which contains the entire stories table, and the other which contains a filtered list of story IDs to implement most of the filtering. This commit removes all of the subquerying, and just does simple filtering in a single WHERE clause. Basic comparison of the two queries shows around an 85% - 90% speedup in the execution time using the new approach, from ~100ms for the current query, and ~10-15ms for the new query (using a test dataset containing 10000 stories). This approach adds a bit of code complexity around filtering stories by story status, but this is a cost worth paying for the performance improvement. The new approach will also allow extra flexibility in the meaning of the story statuses, making it easier to have per-project statuses for example. Story: 2005845 Task: 33627 Change-Id: I7c19372506017726e4fc61ffb09d3cfb9c6b36d3 |
||
---|---|---|
.. | ||
.env | ||
docker-compose.yml | ||
fix-ini.sh | ||
storyboard.conf |