The _dart_add_key_val() function can be called many times on a single page load resulting in potentially expensive calls to token_replace().

In order to avoid repeat executions the results of token_replace() could be statically cached. Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elliotttf’s picture

Status: Active » Needs review
FileSize
988 bytes

FWIW, this patch reduced execution time in _dart_add_key_val() by about 1.3 seconds on the site I'm working with right now.

Status: Needs review » Needs work

The last submitted patch, 2118653-1-dart-add_key_val_performance.patch, failed testing.

elliotttf’s picture

Status: Needs work » Needs review
FileSize
895 bytes

Derp, here's a fixed patch that should pass tests.

bleen’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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