Hi Ryan,
I’ll do my best with my basic english to explain how I have proceeded
With ditto 1.xx, I was unable to load a huge amount of docs ( this is not at a critic about ditto, I’m quite impressed by mark skills and would never have been able to write such a piece of code)
So I was bounded to load at max 500 docs to remain in a reasonable time to display the page.
When mark announced ditto 2, i’ve decided to test the same site and even if the performance were better (twice faster) I was still unable to load the whole content of the siteabout 2 400 docs at this time (I need this for tvExplorer).
So I decided to dig in the code.
I cut the snippet code to see step by step the execution time.
The first weakness was the getParentsIDs.
With 2400 docs in DB, the function was time out (superior to the 30s allowed by my hoster).
I’ve written a nex function to get the doc list differently from the $modx->documentMap; (as the previous function does)
Once done, this new function returned successfully the expected list.
After that, I tried to execute the whole snippet code but same result "maximum time ...."
I was unable to load the page.
I’ve found that ditto asked for every doc the TV output.
So I’ve reversed the logic (which was easy because of the quality of the existing code)
and queried the db for each TV with a where Clause docid IN (list returned by new function)
After this change the page was loading successfully
I had to change some others functions such as getChildIDs (ditto uses a different logic according the params set in the call)
Hope that gives a beginning of explanation.
:-)