This function gets called a lot, especially with a lot of fields on a site. 'text' and 'integer' were missing from defined types, causing entity_property_list_extract_type() to be executed a large number of times, and never be statically cached.

entity_property_list_extract_type() cost was adding 30ms of run time to my particularly large entitied site. 'text' and 'integer' as were not prefixed with 'list<' so was a waste of compute.

Patch on next post simply adds these two types below where 'date' and 'site' are declared to boost this speed.

CommentFileSizeAuthor
#1 2000340-1-entity_token_types_chained.patch600 bytesTaz

Comments

Taz’s picture

StatusFileSize
new600 bytes
Taz’s picture

Status: Active » Needs review

Forgot to change the status

osopolar’s picture

Maybe there is a reason why 'text' and 'integer' aren't in the entity_token_types_chained() function, as they are added apart in entity_token_types(). I guess 'integer' and 'text' aren't chained token types, are they?

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Needs work

I didn't get a noticeable performance increase from this patch and curious @Taz your response to #3 as I don't think those values would be chained types (could be wrong).