On 15/01/2024 08:45, koteswara Rao Gundapaneni wrote:
On Sun, 14 Jan 2024, 18:13 koteswara Rao Gundapaneni, <
koti.gundapan...@gmail.com> wrote:
hi
Daemon threads have identified the performance issue inorder to complete .
Thread which is set as daemon by default has performance bottleneck
If that were the case, there would be a general performance issue for
every Java application.
I am not aware of any general Java performance issue. You have not
provided any evidence to support your claim that there is a performance
issue.
I explain that as below
myeg.setDaemon(true);
myeg.start();
the above start() method is taking long time to complete which is by
default performance bottleneck
You have not explained what object "myeg" is. Based on your previous
statements and the methods called, it appears to be an instance of Thread.
Thread.start() is unlikely to take a long time to complete. Thread.run()
might take a long time to complete but that will depend on the run() method.
so bootstrap has its performance issue as this loader thread is using
daemon thread.
Again, you have provided no evidence to support this statement.
In our code base we have lot of places where we have the code as below as
mentioned above.
myeg.setDaemon(true);
myeg.start();
inorder to resolve the issue we will yield the corresponding thread
Inorder to limit the time taking for above line of code we have the
solution like below
myeg.setDaemon(true);
myeg.start();
myeg.yield();
This is nonsense.
The call to vield() happens after the call to start(). It is impossible
for the call to yield() to make the call to start() faster.
the yield method declared as above will reduce the time taking for start
method
Again, this is nonsense. What you are stating is logically impossible.
Hope this will make sense if not I will write it in my own language telugu.
In additional to reviewing the above nonsense, I have also reviewed the
proposed change to Bootstrap.java that claims to "fix" whatever issue is
observed.
The proposed code doesn't even compile due to basic errors such as
missing ';'.
The proposed code attempts to call a String method (contains())on a
String array.
The proposed code attempts to assign a String to a String array.
The proposed code contains multiple instances of unhandled checked
exceptions.
The proposed code attempts to pass a String when a String array is required.
The proposed code attempts to compare a Method instance with a String
instance
With the above errors fixed the code compiles and, somewhat
miraculously, Tomcat starts. The code has no effect until Tomcat stops
(because of the call to daemon.setAwait(true). During the stop process a
NoSuchMethodException is thrown because of the attempt to call the
Catalina.yield() method that does not exist.
So, in summary, we have:
- a claim of a performance issue that does not exist
- a claimed solution that is logically impossible
- a proposed patch the doesn't compile and is full of errors
- a proposed patch that, when "fixed", doesn't do anything apart from
trigger an exception on shutdown
I will not be engaging any further in this thread.
Responding to threads like this wastes the Tomcat community's time and
detracts the community from useful work. I consider threads like this to
be harmful to the Tomcat community. Should you start further threads
like this it is likely that you will be blocked from posting to the
Tomcat mailing lists and/or be blocked from interacting with the Tomcat
project at Github and/or be blocked from interacting with the Bugzilla
instance used by Tomcat and/or blocked from interacting with the Tomcat
project via any other services.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org