Closed wanao-jd closed 11 months ago
Hi @wanao-jd,
The "problem" with the performance of the Notice Viewer sample app is in the following line of code: https://github.com/OP-TED/eforms-notice-viewer/blob/7ea3c874825cc5d8d7ce6ceffc4bdbf803b021e9/src/main/resources/templates/xsl_markup/output_file.ftl#L33
In the context of the sample application this is not a mistake. It is just a shortcut we took to keep the implementation simpler. The code in that line is heavy to execute but easy to write and understand.
In the context of the production application that we use for TEDAPI however, we had to follow a different approach.
Essentially, the XSL line I shared above, loads all labels from a specific version of the SDK and for a specific language regardless of whether the labels are needed while rendering the notice. This is not a good idea in terms of performance.
TED Viewer (our notice visualisation service that you access through TED API) follows a different logic which performs much better: It loads labels on demand by calling a service. Everything is still done through XSL, but labels are resolved one at a time, only when needed, through a service.
It would be nice if we could share the code for this with everyone (by incorporating a similar implementation in the sample application), but, at the time, it is not possible to include this activity in our immediate planning. I will see what we can share, and I will get back to you. I know of another eSender that expressed interest on the same improvement and is working on implementing it in the same direction as we did for TED Viewer.
Hello, it would be great if this issue could be solved!
Bye, Georg
To convert xml to html (with the sdk that is already download) the notice viewer take about 5 secondes. if we use the ted europa online API it is faster. 1-2 secondes how can we increase performance of conversion in local env with eforms-notice-viewer project ?