If you say you have placed some log messages, I assume you are retrieving the objects through a microfow. This is usually slower than retrieving through XPath. Although retrieving through XPath is not always possible since you may want to show dirty state, it should be a bit faster, since the queries can be optimized.
Second, if you have groups and persons, you may have modelled this as a many to many association. On such associations, setting the navigability to ‘groups and persons refer to eachother’ depending can have a very negative effect on performance, since Mendix has to do many joins before having access to the object. Reverting this to a default navigability could solve your issue.