Revealed via #910156: Remove 'description' keys from schema cache, we're loading the entire 'schema' cache on every page, in case there is an entity loaded for anything - including menu links.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Even better!

sun’s picture

oopsie

sun’s picture

Priority: Normal » Major
FileSize
2.11 KB

Status: Needs review » Needs work

The last submitted patch, drupal.entity-schema-cache.3.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
2.18 KB

Remote entities do not specify a 'base table'.

Status: Needs review » Needs work

The last submitted patch, drupal.entity-schema-cache.5.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
3.81 KB
chx’s picture

Status: Needs review » Reviewed & tested by the community

I have generated nodes and terms and then the front page showed a nice 4.5% performance increase. That's a steal given how simple the patch is. Awesome work.

catch’s picture

Very, very nice.

klausi’s picture

Status: Reviewed & tested by the community » Needs work

No, we don't want to change the test case like that, because it was explicitly written to check for hook_watchdog(). As I described in #742972: Clear entity info cache during module enable hook_watchdog() should be consistent and developers should be able to rely on the fact that a hook in their module is only called when it is fully enabled and installed.

sun’s picture

Status: Needs work » Needs review
FileSize
2.87 KB

Let's fix those tests properly over there.

The only required fix for this patch is the removal of the non-existing and therefore invalid 'base table' definition.

klausi’s picture

Ähm, why is 'base table' invalid? It is listed on http://api.drupal.org/api/function/hook_entity_info/7

sun’s picture

Because the specified table does not exist.

klausi’s picture

Ah right, that thing isn't generated automatically. Sorry.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Thus, back to RTBC, I guess.

sun’s picture

Although my local box is totally not suitable for doing benchmarks, I've mass-applied the following range of current performance patches and am getting a nice boost:

#910190: Entire schema cache needlessly loaded on all pages
#910156: Remove 'description' keys from schema cache
#606966: 'load arguments' of parent path are not inherited
#910124: Clean up menu_contextual_links()

BEFORE patches:
Executed 36 queries in 25.18 ms.
Page execution time was 481.48 ms.
Memory used at: devel_boot()=2.5 MB, devel_shutdown()=16.23 MB, PHP peak=16.75 MB.

AFTER patches:
Executed 35 queries in 15.99 ms.
Page execution time was 471.18 ms.
Memory used at: devel_boot()=1.95 MB, devel_shutdown()=15.85 MB, PHP peak=16.5 MB.

Test page: admin/config/development/devel; Garland; enabled Navigation menu block containing 1 taxonomy term link and 1 node link.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch!!

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Performance

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