id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 58277,Change the position of notoptions lookup in get_option,spacedmonkey,spacedmonkey,"Added in [4855] and #3726 the `notoptions` cache was added to `get_option`. This cache was designed to save database queries, do option name that are none not to exist in the database / cache. However, the ordering this functions present a performance problem. In `get_option` the look for if a option does not exist, is done before if it does. It is extremely uncommon for a get_option, for a option name that does not exist. Most times it is called, it for a option that does exist. This means the call to `notoptions` cache is called pointless. Moving this check, before the database lookup would improve performance. ",enhancement,closed,normal,6.4,"Options, Meta APIs",,normal,fixed,has-patch needs-dev-note,,performance