0

I am new with Spring boot (v1.4.1.RELEASE) but i noticed that the request/response in the embedded tomcat is very slow.. it takes 3-4 seconds to load 800k (jsp page) with very little sql requests. How can I optimize the request?

Cœur
  • 37,241
  • 25
  • 195
  • 267
ROZZ
  • 1,334
  • 3
  • 20
  • 36
  • First you have to check what part is time consuming (on client and server). Is it network, request management, DB access, ... – Isukthar Oct 25 '16 at 13:39
  • This post helped me: https://stackoverflow.com/a/62759292/12284870 – Yonas Dec 04 '20 at 11:08

1 Answers1

1

There are many possible answers of course, but I know about one Spring Boot issue that is directly related to JSP and the performance: https://github.com/spring-projects/spring-boot/issues/2825 (and the similar: https://github.com/spring-projects/spring-boot/issues/7039)

In other words, try to set this parameter in application.yaml:

server.jsp-servlet.init-parameters.development: false
Slava Semushin
  • 14,904
  • 7
  • 53
  • 69
  • Thanks a lot .. i will try this "hack" and will write a feadback. – ROZZ Oct 25 '16 at 13:47
  • @VasilPetrov did you try it? Did it help you? By the way I found another related issue: https://github.com/spring-projects/spring-boot/issues/7376 it's about enabling APR library for Tomcat. – Slava Semushin Nov 14 '16 at 17:05
  • Hi buddy, no ..II did not achieve success.. I switched it to thymeleaf 3 , and now everything is fine .. But i still love more JSP :) – ROZZ Nov 14 '16 at 21:42