dxa-web-application-java icon indicating copy to clipboard operation
dxa-web-application-java copied to clipboard

Model properties mapped with _self cause unnecessary link resolver round trip

Open willprice76 opened this issue 7 years ago • 0 comments

In the GenericSemanticModelDataConverter.selfLink method there is always a round trip to the link resolver to resolve the link: https://github.com/sdl/dxa-web-application-java/blob/58a4fdebafc192b9a87570c684bd97d9091fdc5f/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/mapping/converter/GenericSemanticModelDataConverter.java#L83 This can be unnecessary as:

  1. If you want to convert to an EntityModel, you don't use the link URL
  2. Using the DXA 2.0 model service there should already be a resolved link URL in the EntityModelData (check .getLinkUrl())

This will cause performance problems on pages containing many component presentations, which map to models with a _self SemanticProperty annotation.

willprice76 avatar Aug 23 '18 13:08 willprice76