New ComicPressNavigationWidget SQL queries cleanup #34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As you can see with the following I reduced the amount of queries (used to be 134 +) by adjusting how I use the in_comic_category() now, the high roller is the navigation widget with 25-28 queries by itself.
Can we clean that up some at all? Or is that how it's going to be?
Everything Turned off = 10 queries
Add Default Menubar with no options turned on, = 14 queries (+4)
Default Menubar with all options except navigation since navigation isn't available) = 16 queries (+2)
DefaultMenubar with all options turned on including navigation and add the display of the comic = 22 queries (+8)
Default Menubar (all options + comic disp + comic post) = 26 queries (+4)
Default Menubar (all options + comic disp + comic post + sidebars(l/r)) = 35 queries (+9) for sidebars-both
(menubar all options + comic disp + comic post + sidebars(l/r) + default navigation above comic post) = 41 queries (+6) for default nav
(menubar all options + comic disp + comic post + sidebars(l/r) + default navigation above comic post + footer text) = 42 queries (+1) for footer text
everything above add blog posts (5) 60-62 queries (+22-24 for 5 posts)
Everything above + comic navigation in under-comic 88 queries (+26-28 for a single instance of comic navigation)
After everything is switched over to the new Core-based code we can do proper optimization. Until then, I want to focus on making sure everything works correctly.
Additionally, # of queries is only a loose estimate on the amount of database work being done. The real optimization can only be done when we are logging MySQL queries under very specific circumstances, to get a better sense of what's going on.
Finally, once all working, and only once it's working, can we do PHP profiling using XDebug to ensure the code is as efficient as possible. I want to make sure everything is using the same backend code for doing navigation calculation, storyline structure traversing, and other database-intensive operations before any further optimization is done. I don't want us to prematurely optimize something that may not be working right.