Closed raoulsullivan closed 6 years ago
Thanks @raoulsullivan . I will take a look later today and merge.
@raoulsullivan I merged your changes to master and noticed that the MySQL test fails. Do you have any thoughts?
https://travis-ci.org/gouthambs/Flask-Blogging/jobs/427514097
Yeah, my thought is that I need to do a bit more work! The problem is almost certainly with the ordering of the results when joining the data together, which I remedied for my setup (postgres).
Will spin up a mysql database now and update here.
Addressed in https://github.com/gouthambs/Flask-Blogging/pull/120
Hi,
I was optimising site performance when I noticed that flask-blogging emits a lot of database queries, particularly on the index and sitemap views.
The following PR attempts to remedy that by joining the post, tag_posts, tag and user_posts table in both the get_posts and get_post_by_id methods. This results in moving the responsibility for joining posts to tags from the database to the Python.
The PR also changes from Flask-Cache to flask-caching to overcome this issue.
Enjoy!