Closed (fixed)
Project:
Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2011 at 13:56 UTC
Updated:
28 Dec 2011 at 00:36 UTC
Jump to comment: Most recent file
While doing some basic token performance optimizations I noted that menu_tokens() loads node menu link data regardless whether the tokens are used.
Attached patch fixes it for me, what saved ~4ms on an average page request making use of tokens and passing a node.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1362502-speedup-node-menu-tokens.patch | 2.79 KB | dave reid |
| #2 | token_node_menu.patch | 2.27 KB | fago |
| token_node_menu.patch | 2.28 KB | fago |
Comments
Comment #2
fagoUhm, it's faster but breaks the token :D Next try.
Comment #3
dave reidRevised patch that puts this logic in a cached function which is re-usable.
Comment #4
dave reidCommitted #3 to Git! Thanks fago for helping speed this up!
http://drupalcode.org/project/token.git/commit/80c08b7