cloudfoundry / ibm-websphere-liberty-buildpack

IBM WebSphere Application Server Liberty Buildpack
Apache License 2.0
72 stars 190 forks source link

populateClassCache explanation #486

Closed krismarc closed 3 years ago

krismarc commented 3 years ago

Hello @kevin-ortega @rxu1 ,

this feature significantly increases the time of staging. Could you please explain what it does? It just looks like a double restart. I've just pulled the newest master for compression feature fix and this populateClassCache was already there.

https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack/pull/485/files

Best regards, K.M.

kevin-ortega commented 3 years ago

@KrzMar This feature was added to improve the start up of the app after staging by pre-populating the shared class cache.
A significant part of the shared class cache needed by a Liberty application is built by just a server start/stop (without any application). Starting and stopping the server during staging populates the shared class cache in the droplet. Staging, therefore, bears the cost of populating the shared class once instead of the application each time it starts. While it does increase staging time, subsequent restarting of an application will be significantly faster.

krismarc commented 3 years ago

Thank you for your quick response! This makes sense.