Quantcast

Thymeleaf th:insert (or include) parallelism

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Thymeleaf th:insert (or include) parallelism

kakawait
Hello, I'm currently using Thymeleaf and its feature th:insert (or th:include but I saw it will be deprecated) to include external/remote fragment using UrlTemplateResolver (can be plain old HTML no need to be template rendering) like following:
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Thymeleaf test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
    <div th:insert="http://localhost:5001/"></div>
    <div th:insert="http://localhost:5002/"></div>
    <div th:insert="http://localhost:5003/"></div>
</body>
</html>
However if services for each ports (5001, 5002 and 5003) are a bit slow for example respond after 2 sec, template will be generated after 2 + 2 + 2 = 6 sec even if there is no real dependencies between each fragment. So I would know if it's possible (or any possible clues to how I can extend Thymeleaf to achieve my goal) to tell thymeleaf to fetch each templates using different threads? Thank you Thibaud
Loading...