Jump to:

3433 Posts in 1058 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Dataobject best practice

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

Page: 1
Go to End
Author Topic: 1027 Views
  • Mo
    Avatar
    Community Member
    506 Posts

    Dataobject best practice Link to this post

    Does anyone know if there is a recommended limit to the amount of usage of DataObject::get that can be used during one page load (for optimal performance)?

    Cheers,

    Mo

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Dataobject best practice Link to this post

    That is really a 'how long is a stick' question - it depends on what you're doing. If you're having trouble with performance, it might be that you can simplify your database structure or put in some optimisations (for example, saving some common data between relationships on write, rather than pulling the data on read).

    If you want an 'out of the box' (sort of) performance module, have a look at the 'static publisher' module. It allows you to rsync the generated pages to your internet-facing site.

  • Mo
    Avatar
    Community Member
    506 Posts

    Re: Dataobject best practice Link to this post

    I'm not really getting any performance issues, I was just kind of wondering if there was anything I could work to productively.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Dataobject best practice Link to this post

    Usual rule of thumb is: "Avoid premature optimization". Once everything is working as it should, then you can use the profiler to see if there are some 'quick wins' to be made by combining queries or whatever.

  • Mo
    Avatar
    Community Member
    506 Posts

    Re: Dataobject best practice Link to this post

    I think thats probably a good rule of thumb to work to ,

    Cheers

    1027 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.