While looking at optimizing Ditto I uncovered something interesting.
I ran the same test snippet, only changing the API call from getActiveChildren to getDocumentChildren. I figured there wouldn’t be much of a difference.
The results on a directory with over 1,000 subdocuments (randomly generated via a new tool I will release that creates dummy docs) were as follows:
getActiveChildren took 0.168 seconds to generate the uncached page with uncached snippet call.
getDocumentChildren took 0.784 seconds to generate the same page.
Could someone please enlighten me as to why there is such a significant speed difference between two very similar calls.
I just figured it out. The difference between all fields and only "id, pagetitle, description, parent, alias, menutitle" is the cause of the speed difference.
Still, why would the difference be so great?