After having read JSON PHP templating was the best solution to output JSON data, I added a new method to JSONderulo snippet in order to template Resourcespace (www.resourcespace.org/) API search JSON results:
[[!JSONDerulo?
&feed=`rs`
&apiKey=`[[++rs_api_key]]`
&tpl=`wjd.rs`
&limit=`100`
&cacheTime=`86400`
&cacheName=`rs`
&search=`[[!paramStash? ¶ms=`k` &valueOnly=`1`]]`
&cacheName=`wrs-jsonderulo-cache`
]]
It works as excepted and the snippet create files in MODX cache :
It's around 5-6 sec to perform a search and display images !
But... It seems to me abnormally slow to render:
I do an another test with javascript templating / client side and the result is better and image display is really fast :
Obviously the query and JSON file are exactly the same.
Now, the question : Is normal to have a such difference and a better response time with javascript templating in comparison to PHP/snippet templating ?
I would prefer the MODX snippet / chunk design way but regarding performance it's really bad...
[ed. note: johnxx last edited this post 11 years ago.]