tracker issue : CF-4206264

select a category, or use search below
(searches all categories and all time range)
Title:

CFFile significantly slower then previously versions

| View in Tracker

Status/Resolution/Reason: To Track//NeedMoreInfo

Reporter/Name(from Bugbase): Toby W. / ()

Created: 12/05/2019

Components: File Management, CFFile, Performance

Versions: 2018

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF2018 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 1

Problem Description:

cffile action = "copy" is about 3-4 times slower in CF 2018 compared to CF 11.

Processing images using the cffile tag is much slower on CF 2018 then CF 11. Doing a simple copy take a lot longer. Add that to processing multiple images and the time can increase significantly.

I have tested this with the same spec machines, fresh installed & upgrade. Both win 2012 and 2016 OS. 

Configurations for CF are the same.

CF 11 -  11,0,18,314030 , Java 1.8.0_171   

CF 2018 - 2018,0,06,316308, Java 11.0.1  



Steps to Reproduce:

Repro attached to bug.

Run something like:

<cffile action = "copy" source = "C:/Temp/testimg1.JPG" destination = "C:/Temp/testimg2.JPG">

on CF 11 then repeat on CF 2018


Actual Result:

Process taking 3-4 times longer


Expected Result:

Similar run times to CF 11


Any Workarounds:

None

Revert to CF 11 or use third party tools

Attachments:

Comments:

Here are some timings for the testing I have done using the repro attached This is made substantially worse when using S3:// which is where we are noticing the difference CF11 Local Test 1: 0ms Test 2: 0ms Test 3: 1ms S3 Test 1: 328ms Test 2: 578ms Test 3: 391ms CF 2018 Local Test 1: 4ms Test 2: 5ms Test 3: 4ms S3 Test 1: 803ms Test 2: 1290ms Test 3: 968ms
Comment by Toby W.
31929 | December 05, 2019 09:12:52 AM GMT
ALTERNATIVE: If you are copying/syncing static resources to S3, you may want to consider using CFExecute with S3Express (portable CLI/command line). https://www.s3express.com/ I've found it to be a better alternative, supports multiple threads (faster), gets updated more often & supports newer S3 features, their dev team is responsive and you can auto-generate a log of what transactions were performed. We generate a BAT file, use CFExecute with an immediate timeout and then check the file system for a log at the end of the transaction. This prevents us from locking a thread or consuming RAM dedicated to Java. Here's a sample command line. (The S3Express website has many more samples.) https://gist.github.com/JamoCA/727120f97b33fed5528a We've used S3Express for syncing digital assets for commercial sale (using time-limited download link), backing up SQL and syncing JS/CSS resources to our CDN. (We initially desired to use the built-in S3 support, but found it to be slow, unreliable and didn't support latest S3 features.)
Comment by James M.
31930 | December 06, 2019 02:56:55 PM GMT
Toby, with a local disk based 25KB file, copying w/ CF11 and CF2018, takes about the same time on my test machine (2ms) - is your CF11 and CF2018 on the same host platform? - what is the update level you are on on CF2018? - what is the size of the file you're copying?
Comment by Piyush K.
32029 | January 08, 2020 07:19:34 AM GMT
Update levels are shown above in the first post. All servers are running on the same platform. Dedicated storage. The same issue is replicated on my local test servers internally as well. So storage devices are rules out The file size was approx 50kb This issue is more to do with S3 then local. We can deal with 2-4ms but S3 is terrible
Comment by Toby W.
32030 | January 08, 2020 07:43:26 AM GMT
Worth noting that I am now running HF 7. I have also tested with different versions of Java incase the issue is there but the results are the same
Comment by Toby W.
32031 | January 08, 2020 07:44:27 AM GMT