When using getResources to list resources which all have assigned several TVs and they are being processed to retrieve their display / inherited / default values, ModX can slow down very quickly. I believe this is because every time renderOutput() is called, a lot of database queries, directories read, files opened, etc. If you’re listing 100 documents, each with 10 TVs, this rapidly slows things down.
Is there are form of caching used on TV values which could help this process? Or optimisations to the renderOutput function?
When a resource is cached, are it’s TV values cached too? If not, would ModX benefit from rendered TV values being stored in a cache database (I reckon this could be done as a plugin?)
I see a
recent commit which improved getting the raw value - could something similar be done for rendered values?
Any input welcome.