To reduce expensive JOIN, this patch moves comment statistics to node table. Teh code and update patch are nearly complete. I need some help with the following items to finish the patch.

1. review node_search(). i think more needs to be done there. there is some funky $join2 mojo there. maybe Steven can help?
2. possibly enhance the update function to use the update.php long running update system. I looked at the revisions update but still am not sure how to do this. perhaps neil, steven, or gerhard could look at this.
3. benchmark on a large node site to assure that actually makes a difference.

-moshe

Comments

moshe weitzman’s picture

StatusFileSize
new24.4 KB

with some input from Steven, i've knocked off 1 and 2 so just benchmarks against a many node site are needed now.

moshe weitzman’s picture

StatusFileSize
new23.77 KB

keep up with HEAD

dries’s picture

I'll try to benchmark this later this week.

moshe weitzman’s picture

StatusFileSize
new22.74 KB

sync to HEAD for system.install change

dries’s picture

The comment counts (x comments in below node teaser) do not appear to display on the main page, after running the upgrade.

My main page is 1% faster with this patch.

dries’s picture

I'll try some more tests with additional blocks (eg. recent comments block) on the front page.

moshe weitzman’s picture

@dries - if possible, test forum pages with the drupal.org database. this patch only matters on sites with many nodes ... i will look into the missing comment counts.

moshe weitzman’s picture

Assigned: moshe weitzman » Unassigned
Status: Needs review » Needs work

unassigning this. mayeb someone else can benchmark and find a way that this delivers better boost.

gerhard killesreiter’s picture

Version: x.y.z » 6.x-dev

if somebody provides an updated patch, I'll run the test that I ran on my users_access patch.

Zen’s picture

Isn't this regressive with respect to modularity?

moshe weitzman’s picture

@Zen - yes it is. the benchmarks will show if the speed improvement merits the loss of isolation/modularity.

moshe weitzman’s picture

Status: Needs work » Closed (duplicate)

david strauss has been working on this recently. can't find the link right now.

AjK’s picture