larowlan/token — pull request #25 by Berdir (2014-08-27 17:13:00+00:00)
Title: Optimize field_tokens() by looping over requested tokens instead of all fields

field_tokens() is extremely slow right now because it accesses all fields. For some strange reason, it loops over all fields and checks if a token for them is requested.

It's much easier and faster to loop over tokens and check if they match a field on the entity.

Also removed some unused variables and double checks (like the token module check)