Attempt to warm classes.

This commit is contained in:
Kavin 2022-11-15 09:43:35 +00:00
parent e8cb35acf9
commit f85b9d095d
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
3 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,8 @@ COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
COPY VERSION .
RUN /bin/bash -c 'java -Xshareclasses:allowClasspaths -Xquickstart -jar /app/piped.jar &' ; sleep 30 ; pkill java
EXPOSE 8080
CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseParallelGC -XX:-UseBiasedLocking -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar

View File

@ -6,6 +6,8 @@ COPY ./piped.jar /app/piped.jar
COPY VERSION .
RUN /bin/bash -c 'java -Xshareclasses:allowClasspaths -Xquickstart -jar /app/piped.jar &' ; sleep 30 ; pkill java
EXPOSE 8080
CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseParallelGC -XX:-UseBiasedLocking -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar

View File

@ -90,7 +90,10 @@ public class Constants {
Properties prop = new Properties();
try {
YOUTUBE_SERVICE = NewPipe.getService(0);
prop.load(new FileReader("config.properties"));
if (new File("config.properties").exists()) {
prop.load(new FileReader("config.properties"));
}
PORT = Integer.parseInt(getProperty(prop, "PORT", "8080"));
HTTP_WORKERS = getProperty(prop, "HTTP_WORKERS",