Are computationally inefficient due to the unnecessary repetition of xml2::xml_attr(all_translations, "id"). By adding this once at the top and using the resulting object to select specific rows, I reduced computational time by 90%.
Function was taking 3 minutes and it takes now 20 seconds.
While testing
form_schema_ext()
with a large form, it was taking about 3 min to run this function.After close inspection I realized that the chunks:
and
Are computationally inefficient due to the unnecessary repetition of
xml2::xml_attr(all_translations, "id")
. By adding this once at the top and using the resulting object to select specific rows, I reduced computational time by 90%.Function was taking 3 minutes and it takes now 20 seconds.
Nothing else changes structurally