Closed (outdated)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2012 at 15:10 UTC
Updated:
19 Aug 2025 at 11:58 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedOK, so every flag being loaded up is apparently by design in flag_get_flags():
Smarter minds than me have worked on flag performance optimization -- this is because any call to this can't know how many other times it'll be called to get other types of flag, so it's best to hit the DB once and hard than lots and little.
Now for the being called twice:
In factory_by_row(), it seems both of these end up invoking the hook:
which is because the flag_create_handler() function also calls:
I don't know the code for building a flag object well enough to figure this out. Anyone else is welcome to take a look and have a go at figuring it out :)
Comment #2
joachim commentedUpping to 3.x.
I've added a lot of docs about flag creation since filing this.
The duplication of $flag->options() is the thing to look into here.
Comment #3
ivnishClosed as outdated because Drupal 7 is EOL