Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

Dataobject best practice


Reply

5 Posts   1044 Views

Avatar
Mo

18 June 2009 at 1:29am Community Member, 509 Posts

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

Avatar
Hamish

18 June 2009 at 8:45am Community Member, 712 Posts

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.

Avatar
Mo

18 June 2009 at 10:58am Community Member, 509 Posts

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

Avatar
Hamish

18 June 2009 at 11:01am Community Member, 712 Posts

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.

Avatar
Mo

18 June 2009 at 11:06am Community Member, 509 Posts

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

Cheers