Quantcast
Viewing all articles
Browse latest Browse all 3491

A question regarding rendering many items in relation to performance

Hey guys, firstly big thanks for all the people involved with JMVC

My question is basically this... We have a product browser powered by a ProductBrowserController which renders products, behind each product is a ProductController. The product browser receives the data for the products and loops over them creating an instance of ProductController for each product... the problem is each product instantiates itself and calls its render function which renders that product in the product browser. The problem becomes apparent with many products and basically this results in a massive performance hit. 

What are some workarounds/solutions to this kind of scenario.... , perhaps it would be better to have the product browser render all the products and then instantiate the controller on them but  this would mean that ProductController becomes dependent on the product browser.

Anyway any suggestions/hints are welcome :)

Viewing all articles
Browse latest Browse all 3491

Trending Articles