Jump to:

1384 Posts in 493 Topics by 522 members

Themes

SilverStripe Forums » Themes » Repeating same control loop & performance

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 443 Views
  • KINKCreative
    Avatar
    Community Member
    56 Posts

    Repeating same control loop & performance Link to this post

    Hi there, a client of mine wants a jQuery based preview of articles with one large image and two smaller ones, circulating. They all include elements from the same <% control %> block. I am wondering how the SS works - does it recognize the same method is being run multiple times and caches it. Or would repeating the control block three times run the method and the DataObject::get in it three times, thereby increasing the page rendering time?

    What's a good solution in this case. I'm thinking - a class private array to save the DataObjectSet if it hasn't been run yet?

    Appreciate any input on this!

    443 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.