nodewords_load_all_includes() does a file_scan_directory() to load. This is called via hook_preprocess_page() - which is run more or less every request to Drupal, the i/o from this can be a performance issue on some systems, especially given this is a fixed list that will only change when a new include is added. Attached patch changes this to just an array, otherwise logic should be the same.

Comments

catch’s picture

Issue tags: +Performance, +i/o
StatusFileSize
new846 bytes

Uploading the patch helps...

Status: Needs review » Needs work

The last submitted patch, 115224_nodewords.patch, failed testing.

damienmckenna’s picture

Issue tags: +v6.x-1.12 blocker

Thanks Catch, will work on getting this included in the next release.

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new1012 bytes

Looks like the checkout I was working from is out of date. Here's a patch (untested) that should apply to latest 6.x-1.x.

dave reid’s picture

Title: Remove file_scan_directory() from nodewords_load_all_includes() » Remove file_scan_directory() from _nodewords_load_hook_files()
Status: Needs review » Fixed

Committed a modified version of the patch to Git that I tested myself: http://drupalcode.org/project/nodewords.git/commit/55909db

Thanks catch for profiling and reporting the performance bug!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

damienmckenna’s picture

Status: Closed (fixed) » Needs work

Needs to be re-rolled against the latest 6.x-1.x codebase.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB

I re-rolled catch's patch from #4 against the latest 6.x-1.x codebase.

dave reid’s picture

Status: Needs review » Fixed

This has been re-applied.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

damienmckenna’s picture

Status: Closed (fixed) » Needs work

Needs to be re-rolled against 6.x-1.x.

damienmckenna’s picture

Status: Needs work » Fixed
StatusFileSize
new1 KB

Re-rolled and committed.

Status: Fixed » Closed (fixed)
Issue tags: -Performance, -v6.x-1.12 blocker, -i/o

Automatically closed -- issue fixed for 2 weeks with no activity.