You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked what is happening in the internal of SQLLine by using the jdb command when the issue occurs. As a result, it seems that java.util.regex.Pattern runs many times and it takes a long time.
And, the java.util.regex.Pattern is called by JLine. So, I investigated this issue on the JLine side. As a result, I found the following PR. This issue has already been reported and fixed on the JLine side.
Also, the above fix is released in JLine 3.23.0. However, the latest SQLLine (1.2.0 and 1.13.0-SNAPSHOT) uses JLine 3.21.0. So, I think we can fix this issue by using the latest JLine in SQLLine.
Temporary workaround
According to the PR of JLine, the issue occurs when JLine runs java.lang.String.matches against the value of LS_COLORS.
So, I tried to set an empty string to LS_COLORS as follows:
root@87bebc5e1fbe:/sqlline# java -jar ./target/sqlline-1.13.0-SNAPSHOT-jar-with-dependencies.jarNov 16, 2024 6:55:03 AM org.jline.utils.Log logrWARNING: The terminal provider jansi has been deprecated, check your configuration. This warning can be disabled by setting the system property org.jline.terminal.disableDeprecatedProviderWarning to true.sqlline version 1.13.0-SNAPSHOTsqlline>
As shown above, I was able to run the SQLLine, and the prompt appeared soon. However, there was a WARNING message. It seems that the JANSI is now deprecated on the JLine side. So, according to the document of JLine, I added JNI as follows:
Update the version of JLine and add JNI in addition to JANSI.
root@87bebc5e1fbe:/sqlline# java -jar ./target/sqlline-1.13.0-SNAPSHOT-jar-with-dependencies.jarsqlline version 1.13.0-SNAPSHOTsqlline>
As a result, the WARNING message is not shown. So, I think it would be better to update the version of JLine to resolve the issue and add JNI to avoid the WARNING message.
That's all.
Regards,
The text was updated successfully, but these errors were encountered:
Hello Team,
I faced a performance issue that the prompt was not shown for a long time when I ran SQLLine in eclipse-temurin:8-jdk-noble container.
It seems that the root cause of this issue exists on the JLine side. So, I want to update the version of JLine that SQLLine uses.
I will submit a new PR. However, I'm not familiar with the rules of this repository. So, could you please correct me if I wrong something?
The issue details are the following:
Overview
When I run SQLLine in the eclipse-temurin:8-jdk-noble container, the prompt does not appear for a long time.
How to reproduce the issue
Note
To avoid the same issue in the build process, you must set
LS_COLORS=""
when you run the./mvnw package
command.Start eclipse-temurin:8-jdk-noble container.
docker run -d --name sqlline-test --entrypoint sleep eclipse-temurin:8-jdk-noble inf
Run bash in the container.
docker exec -it sqlline-test bash
Install the
git
command.apt update && apt install -y git
Build SQLLine based on the current
main
branch.Run SQLLine in the container.
java -jar ./target/sqlline-1.13.0-SNAPSHOT-jar-with-dependencies.jar
The prompt does not appear for a long time...
Issue details
I checked what is happening in the internal of SQLLine by using the
jdb
command when the issue occurs. As a result, it seems thatjava.util.regex.Pattern
runs many times and it takes a long time.Stack of SQLLine when the issue occurs.
And, the
java.util.regex.Pattern
is called by JLine. So, I investigated this issue on the JLine side. As a result, I found the following PR. This issue has already been reported and fixed on the JLine side.Also, the above fix is released in JLine
3.23.0
. However, the latest SQLLine (1.2.0
and1.13.0-SNAPSHOT
) uses JLine3.21.0
. So, I think we can fix this issue by using the latest JLine in SQLLine.Temporary workaround
According to the PR of JLine, the issue occurs when JLine runs
java.lang.String.matches
against the value ofLS_COLORS
.So, I tried to set an empty string to
LS_COLORS
as follows:LS_COLORS="" java -jar ./target/sqlline-1.13.0-SNAPSHOT-jar-with-dependencies.jar
As a result, I was able to see the prompt soon as follows:
I think we can use this way as a temporary workaround.
My proposal
I updated the version of JLine to apply the fix of JLine as follows:
Update the version of JLine.
Run SQLLine with JLine
3.26.3
.As shown above, I was able to run the SQLLine, and the prompt appeared soon. However, there was a WARNING message. It seems that the JANSI is now deprecated on the JLine side. So, according to the document of JLine, I added JNI as follows:
Update the version of JLine and add JNI in addition to JANSI.
Run SQLLine with JLine
3.26.3
and JNI.As a result, the WARNING message is not shown. So, I think it would be better to update the version of JLine to resolve the issue and add JNI to avoid the WARNING message.
That's all.
Regards,
The text was updated successfully, but these errors were encountered: