I don't know if this is possible, but I just want to ask if we can cfhttp or any other thing to read the selected amount of data instead of putting the whole file in CFHTTP.FileContent.
I use cfhttp and want to read only the last two lines from remote xml files (about 20 of them) and read the middle two lines from some text files (about 7 of them). Is there a way that I could just read this specific data instead of getting all the files, because it takes a lot of time right now (about 15-20 seconds). I just want to reduce the runtime of my .cfm page. Any suggestions???
Hmm, not a very special way to get only parts of deleted files.
Do you need to do this every time? Could you get the files in the background, write them locally, and so that your actual incoming requests just read these files? Make reading remote files asynchronous for incoming requests?
If not, and you are using CF8 +, you can use CFTHREAD to deploy various queries for parallel operation: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_t_04.html
In the end, you can use the "join" action to wait for all threads to complete.
Edit:
Here's a great Ben Nadel tutorial on using CFThread to parallelize CFHTTP requests:
http://www.bennadel.com/blog/749-Learning-ColdFusion-8-CFThread-Part-II-Parallel-Threads.htm
- :
27-30 HTTP- 20-30 . 1-2 , .
HTTP . ColdFusion.
, CFHTTP = "HEAD" , .
?
method = "HEAD" http, , . , 30 , , .
CF , URL?
XML, , xmlSearch() ?
, u numOfLines ?
Source: https://habr.com/ru/post/1743049/More articles:iPhone SDK Automatically scroll UIWebView to a specific position - iphoneHow to create a controller and action without a model? - ruby-on-railsJava Swing - issue in JSpinner - javaFailed to link Hello World! - c ++Why does each thread in my application use a different hibernation session? - javaIsn't that fading away? - c ++Deploying an application with a mannequin / source data - iphoneсамонастройка AHAH без полной загрузки страницы - javascriptWhere should I put contextual data related to an object that is not actually a property of the object? - oopCalling the NOW () function in MySQL - phpAll Articles