Cache CFImport custom tag resolution, it's slower than ACF

Description

I stumbled upon a significant performance difference between invoking a ColdFusion custom tag using <CFModule> vs using <CFImport>. It seems that the "import" version checks for the file existence of the given tag every time the tag is consumed. This was discussed in the forums:

// MUSTMUST use cache like regular ct

// page source

https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/tag/CFImportTag.java#L50-L51

 

https://dev.lucee.org/t/cfmodule-vs-cfimport-radically-different-performance/7999

Replication tag MyTag.cfm:

Then, this was tested with:

Based on the FusionReactor profile, the CFImport version spends all its time on FileIO:

I wonder if there's a way to cache the file check so we only do it once?

Assignee

Unassigned

Reporter

Ben Nadel

Affects versions

Priority

New