Editor `_get(id)` inefficiency

Editor `_get(id)` inefficiency

RagnarGrootKoerkampRagnarGrootKoerkamp Posts: 48Questions: 14Answers: 1

When the function $editor->_get($id) is called, it also adds the field options to the return value. However, both calls to this function from within Editor.php (where $id is not null) immediately discard this data.

It might be more efficient (save queries) to only include the option data when the id is not given as a parameter.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    Excellent point - thanks for flagging this up! I agree - I think a conditional check to see if it is actually needed or not would be useful here.

    Added to the list for 1.6.2!

    Regards,
    Allan

This discussion has been closed.