Issues

Select view

Select search mode

 

isInstanceOf Performance Degradation

Fixed

Description

When calling the function isInstanceOf() and returns false, under Lucee 5.2.1.9 it is taking 50-90ms to complete vs 0-1ms on Lucee 4.5.5+006 and older. This has major impact on the performance of an application doing any kind of reflection with this function. The earliest version of Lucee in which this problem appears, that I have tested, is 5.0.0.252

Testcase attached.

Environment

Lucee 5.2.1+9 via commandBox Windows 10

Attachments

1

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 27 June 2017 at 20:07
Updated 8 May 2020 at 19:19
Resolved 1 November 2018 at 15:11

Activity

Show:

tom chiverton16 July 2019 at 12:42

Was there no chance to backport this to 5.2 ?

Michael Offner29 October 2018 at 15:27

problem is that lucee searches for the class "foo" (in case of the second example) in all available classloaders, what is wit OSGi much slower.

Alexander Kwaschny16 February 2018 at 22:55
Edited

I encountered this issue today on 5.2.5.20 and latest snapshot. Makes checking non-components a performance nightmare. Current workaround: call isObject() before calling isInstanceOf().

Rory Laitila5 October 2017 at 23:52
Edited

Additional notes, the slow down is only for Java objects or built in types which are java objects (string, date, numeric etc). When checking CFCs, they do not appear to have a slowdown.

Flag notifications