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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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
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.
I'm not really getting any performance issues, I was just kind of wondering if there was anything I could work to productively.
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.
I think thats probably a good rule of thumb to work to :),
Cheers