Extremely slow application after implementing Dozer lib

Asked

Viewed 14 times

1

I have a JSF application.

I have just included a layer of Dtos and I need to transfer the values from Entities to Dtos and vice versa.

Searching Google, found lib recommendations Dozer in the Soen.

I included dependency and used it as Singleton, as specified by the documentation.

Both entities and Dtos have the same field names, so it is not necessary to make explicit mapping (XML or annotations).

With everything, the application fixed extremely slow after including Dozer dependency.

I even enabled the lib log to see what happened and everything is ok. I won’t post the log here because it’s huge, but I’ve read it all over and it’s all right.


I’m using hibernate with most relationships with FetchType.LAZY. Includes the configuration file dozer.properties with the configuration below and the behavior remains the same.

dozer.beans.proxy-resolver-bean=org.dozer.util.HibernateProxyResolver

Follow the code of the utility class I created to copy the values:

import org.dozer.DozerBeanMapper;
import org.dozer.Mapper;

public final class CopyPropertiesUtil {

    private static Mapper mapper = getInstance();

    public static final Object copyProperties(final Object origin, final Class<?> destinationType) {
        return origin == null ? null : mapper.map(origin, destinationType);
    }

    private static final Mapper getInstance() {
        return mapper == null ? new DozerBeanMapper() : mapper;
    }
}

Any help or suggestion is welcome.

  • I even enabled the lib log to see what happened and everything is ok. I won’t post the log here because it’s huge, but I’ve read it all over and it’s all right. - Is the log not the bottleneck?

  • I enabled the log precisely because it was slow @Victorstafusa However, I will disable tomorrow and comment on the behavior

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.