문제

Yesterday I asked this question on if loading/importing classes/& creating objects from external libraries in servlets cause any performance issue ? Answer I got is may or may not but if library size is big and if we are initiating memory intensive/time consuming jar in Servlet, it is surely going to slow down page load time.

Further question is : is it possible that if we use Listners, (initiate objects from time consuming libs on Tomcat startup, and use them in servlets wherever needed) we can save time taken on every pageload ?

도움이 되었습니까?

해결책

Generally speaking, you will only save time in the first or initial pageloads.

Once the Classloader builds up the library and its instances generated by your application, further pageloads would be barelly affected.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top