Asset list slow with JSON data source as root node


(Rob Gilbert) #1

Hi Guys,

 

I have an JSON data source that is querying an API and giving me a bunch of objects. Around 100 separate objects in the array each with 9 x key:value pairs.

 

I have then set up an asset list which has the data source as it's root node and prints out the various bits of data using the keywords from the JSON data source asset.

 

There seems to be a massive bottleneck (10-15 secs) as the asset list gets the data from the asset/shadow assets and then another as it prints the results as evidenced by checking the page *url*/_performance.

 

Is this to be expected given the size of the data set or am I going about this all wrong? Screen Shot 2016-01-21 at 17.31.57.png (17 KB)


(Bart Banda) #2

Not sure about if that's normal or not without looking into the implementation further and the actual JSON data, but you could try and use a REST JS asset instead and print the data using server side JS that way instead of going through and asset listing.

 

So you could basically just get the REST JS asset to load the data from your JSON source, print the data using the server side JavaSCript box, and then nest the REST asset into your content. 


(Rob Gilbert) #3

Thanks Bart - server side rendering probably sounds like the sensible way to go here.