Bug #94442 | ResultSetImpl.getDouble is inefficient because of BigDecimal (re)constructions | ||
---|---|---|---|
Submitted: | 22 Feb 2019 10:01 | Modified: | 21 Jun 2019 20:51 |
Reporter: | Oliver Robertshaw | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S5 (Performance) |
Version: | 8.0.15 | OS: | Any |
Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
Tags: | FloatingPointBoundsEnforcer |
[22 Feb 2019 10:01]
Oliver Robertshaw
[22 Feb 2019 10:02]
Oliver Robertshaw
Profiler
Attachment: yp-profiler.png (image/png, text), 48.29 KiB.
[6 Mar 2019 7:58]
Alexander Soklakov
Thanks Oliver! You're right, it should be improved.
[21 Jun 2019 20:51]
Daniel So
Posted by developer: Added the following entry to the Connector/J 8.0.17 changelog: "ResultSetImpl.getDouble() was very inefficient because it called FloatingPointBoundsEnforcer.createFromBigDecimal, which needlessly recreated BigDecimal objects for the fixed minimum and maximum bounds. With this fix, the objects BigDecimal.valueOf(min) and BigDecimal.valueOf(max) are cached after they are first created,thus avoiding their recreations."