質問

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