Bug #88347 Easy performance win
Submitted: 3 Nov 2017 15:19 Modified: 6 Sep 2021 9:19
Reporter: Kees Kuip Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.44 OS:Any
Assigned to: CPU Architecture:Any

[3 Nov 2017 15:19] Kees Kuip
Description:
The parameter eventCreationPoint of constructor of class ProfilerEvent is not used. 
But every caller initialises this parameter through the use of the expensive method "LogUtils.findCallingClassAndMethod(new Throwable())"

So there is an expensive calculation but the result of the calculation is ignored. Can this code be removed?

I found this peace of code while profiling my application. 1% of CPU usage was spend on the findCallingClassAndMethod method.

How to repeat:
There is no how to repeat. Just look at the code

Suggested fix:
Remove the parameter eventCreationPoint in ProfilerEvent.java
[7 Nov 2017 9:43] Chiranjeevi Battula
Hello Kees,

Thank you for the bug report.
Verified based on internal discussion with dev's.

Thanks,
Chiranjeevi.
[6 Sep 2021 9:19] Alexander Soklakov
Posted by developer:
 
This bug is irrelevant to the c/J 8.0 code.

Connector/J 5.1 series came to EOL on Feb 9th, 2021, see https://www.mysql.com/support/eol-notice.html, so this bug will not be fixed there.