New ComicPressNavigationWidget SQL queries cleanup #34

Open
opened 2009-12-25 23:40:26 +00:00 by Frumph · 1 comment
Frumph commented 2009-12-25 23:40:26 +00:00 (Migrated from github.com)

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)

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)
johnbintz commented 2009-12-31 02:42:41 +00:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/comicpress-2.8#34
No description provided.