The repeated CFC function call is much slower than the UDF version

For a project, we were faced with unexpected behavior of a CFC. Without going to much into the details of the project, it boils down to the following: when we run through a set of records, say 100 and apply a function to this topic, the overhead is 4-5 seconds extra when we call it a component instantiated (only once) compared to when code us as a UDF. Since our application can process thousands of records in 1 past the overload will quickly over 100 seconds compared to the UDF.

I was wondering if there is no logical explanation for this behavior. From what I understand a function called from a component should not add any notable overload after the component was instantiated.

Our installation is an installation of Coldfusion 8 Jrun running on Linux. We didn't really find anything on the web documenting this (or we found we have said that there will be no additional charge). We could modify the function call to a call from the UDF, but we prefer to keep in a CFC as there are more things behind the scenes that just formatted data.

B.

HA!  Cool!!! I think I solved it something, I feel so proud.

I run the code of Adam and the first time I ran it I got similar to Biebel3 results.  But it's curious, I got the output of debug it showing that it wasn't show where the time was spent.  He would show almost two full seconds to build the page of CFCS, but the components in the table of debugging only added up to about 50 milliseconds.

I tired first put a top of the page of CFC, but that has not changed the results.  Because even if you do not display the results, ColdFusion still satisfied the debug output.  I went into the administrator and effectively disabled the debugging feature.

Alto, I started to have the results displayed by Adam.

It seems that it is a question where it takes a lot of overhead for ColdFusion compile a record of debugging for each call of CFC in this large loop.

The good news, this is a pretty easy solution for a production system.

Tags: ColdFusion

Similar Questions

  • Guest WiFi network much slower than normal on the network

    Speedtests leave a device attached to the 5 GHz wireless guest network are much slower than when the same device is connected to the normal 5 GHz WiFi.

    I measured reproducible all about 7ms 18/10 down on the network of comments and 1ms 320/250 Mbps on the normal network. Same place, same camera, same speedtest app, same test server.

    Similar results of multiple devices (laptop, Windows, iPhone 6 s). No change after a reboot. QoS is off. Firmware is 1.0.6.28_1.1.83.

    What could be the reason? I don't think that I had the same problems a few months ago, but I has not changed settings since then, except for the upgrade of the firmware when a new version appeared.

    Thanks for your advice.

    that version was pulled and pulling FW rarely happens... back having previously worked FW

  • Playback of a view is much slower than reading the table

    Hello

    I use the view in the physical layer. Query from this point of view is quite compilcated. However if I use correct filters the result is very fast (a few seconds)

    Responses of dashboard if I put a few columns from this point of view, and use the same filter, to 4 to 5 minutes to get the result. I don't know why the reading of the opinion is so slow on dashboard.

    If I create a table based on the view and use this table in the physical layer, then the result is much faster.

    Thank you

    Hello

    When the function u view the report in the bi bottom server sends the request to the database (if the cache is disabled).
    Come see, you already mentioned this query view is quite complicated, fires every time the query whenever you click on the report and checks all aggregations, the filter conditions, and joins.
    come to table, you are calculated and stored, each time that you run the report he just send the query like Select from table *.

    for this reason, the data view recovery is slow to table.

    See you soon,.
    Aravind

  • Why Firefox MUCH slower than the 8.1 9.0? Just downloaded and tried and am used to dramatic improvements instead!

    It's a fact! Web pages load much more slowly, and I deleted the cache and done all the typical checks of my pages frequently visited with the same result.

    I just found the problem. For some reason, when I upgraded to 9.0, the settings in tools/options have been modified in the section on how Firefox connects to the Internet. I found to be returned to: 'use the system proxy settings' when I had previously put in "no proxy settings." Once I changed back, the speed is back up on top of the browser and everything checks very well now. Just in case you guys that see happen, then check this particular setting.

    In my situation, I am just connect to Sprint broadband with card data and did not the routers or network worry except that Windows 7 has implemented when I update software Sprint from time to time. This suggests that maybe Firefox 9.0 was just delivered to this particular my computer configuration, although it worked well like that. I hope this might help someone else!

  • CHKDSK in windows xp hangs at 0% when the index checking, but eventually ends. Why it suddenly runs so much slower than before? Thank you.

    Once I got this error message after 3-4 were revealed when checking indexes scene: "an unexpected error has occurred...". ». At that time there chkdsk stopped and I had to close the window.

    Test the hard drive with a diagnostic utility downloaded from site of the disc mftr. or use SeaTools for BACK of Seagate. You create a bootable CD with the files you download. You will need a third party burning software to do as the free ImgBurn, Nero or Roxio. Burn as an image, not in the form of data.

    http://www.ImgBurn.com

    http://www.Seagate.com/www/en-us/support/downloads/SeaTools/seatooldreg
    http://Seagate.custkb.com/Seagate/CRM/selfservice/search.jsp?docid=201271 (how-to)

    Boot with the CD that you have done and do a full test of the reader. The physical tests fail, replace it. MS - MVP - Elephant Boy computers - don't panic!

  • WRT160N speed much slower than the old WRT300N

    Speedtest.NET reports 5Mbsec vs 15 mbcvm old router. Cox's ISP.  I tried to disable UPnP as not suggested, no effect.  I tried to change the MTU to 1300 and 1350 as suggested by others, no effect.  Any other ideas?

    What is the version number of your router?

    What is the Security Mode?

    To get the best speed through the router, it took to set the Mode of WPA or WPA2 security. Also, try it out below mentioned parameters.

    Open an Internet Explorer browser on your computer (desktop) wired page. In the address bar type - 192.168.1.1 and press ENTER...
    Let the empty user name & password use admin lowercase...

    Click on the Wireless tab

    Click the sub-tab under wireless > Wireless Security...
    Change the mode of WPA wireless security, encryption, select TKIP. Password input your desired WPA key. For example, MySecretKey, this will serve as your network key whenever you connect to your wireless network. Do NOT give this key to anyone and do not forget the key.
    NOTE: The password must be more than 8 characters...

    Click the settings advanced wireless
    Change the tag to 75 interval, change the Fragmentation threshold to 2304, change the RTS threshold to 2304 and click on save settings...

  • Why my iMac 4K (late2015) runs so much slower than my MacBook Pro 128SSD (end of 2012)?

    Both are basic model, without Add - ons or updated, the new iMac, retina display 4K runs as slow as some laptops HARD drive.

    What is the defect of manufacturing for my iMac? Any idea?

    Thank you.

    Your Mac has a Fusion (mixture of Spinning/SSD HD) drive, or is it totally SSD? How much RAM you have installed on the iMac over the laptop?

    You can download and run EtreCheck and post the contents of his report here and someone can spot something that could be the cause of slowdowns:

    http://etrecheck.com/

  • Development of 2d - performance (much slower than 9000 9500) games


    Not really a player, I don't think it will be very useful, and it's entirely anecdotal, so I would not base your decisions on that, but maybe this will help you.

    Regarding the "power" of the various models of Blackberry, you could search the Internet, looking for the processor that is used as an indicator of the power.  BBs of Java didn't have (at least as I understand it) a graphics processor, then all the image processing is done on the main processor.

    You will find if you look at this page:

    http://en.Wikipedia.org/wiki/BlackBerry_Bold

    that the 9000 has a 624 MHz Marvell Tavor PXA930, while you are looking for here:

    http://en.Wikipedia.org/wiki/BlackBerry_Storm

    your Storm has a dual core CPU 400 MHz and ARM9 274 MHz ARM11

    Using the cycles in comparison, it would mean for me during the development of a game, it'll be quicker on the 9000 the storm, because I believe that the treatment of Java is in fact all is done on a single processor, if your painting will be restricted to the 400 Mhz on the storm.

    My experience is "BOLD" seems faster than the storm in general, but I actually always put that down to the bigger screen being slower to draw.

    In terms of processing power, the phone slower that I think you could develop to is in fact the storm, but actually I would not develop for it.  It has a system with a somewhat strange interface because of the screen push.  I would ignore this device and just concentrate on OS 5.0 devices.  To this end, the slower device is probably the Blackberry Curve 8520, with a 512 MHz processor.  I would get one of these for your tests.  Also, the (screen size, keyboard) form factor is shared by a large number of other phones.

    In general terms, my brief experience with treatment of the game showed me that if you want your game to go fast, be updated too little screen that you can.  So use 'regions' in your paint method to specify exactly which pieces on the screen should be updated.  In my tests, I tried to have a cursor to move around the screen using the trackpad.  If I moved the slider and then redisplays the whole screen, the performance has been extremely slow.  But if I just painted on the slider of the region it's in, and he painted in the apartment that he had moved, I got a slider action much, much more flexible.

  • WRT310N - Tests of speed than 802.11 g or 802.11n are MUCH slower than Ethernet

    Hello. I have a WRT310N router connected to a cable modem. Because my internet connection is capped at 16 Mbps, I wait like http://speedtest.net/ speed tests and http://www.speakeasy.net/speedtest/ are very similar on Ethernet and wireless.

    The results more wireless are extremely poor (less than 1 MB/s) but via Ethernet, they are all around 16 Mbit/s.

    I first noticed questions during video streaming on Netflix HD for my XBOX 360 more 802.11n. My internet connection is fast enough for this, but not the video downgrades. This is clearly a problem with my wireless setup, but I don't know why it is so poor.

    Any suggestions are greatly appreciated.

    Thank you
    Jared

    Disable the made frame burst and also reduce the MTU to 1365 on the Configuration tab and click on save settings... Now, cycle power to the router and check... If this makes no difference then, try upgrading/re-flash firmware of the router and re-configiure the router from scratch.

  • Why is my wifi connection much slower than my 3G connection?

    I lot to access web pages when connect you via wifi. I am connected to my wifi network (at least he shows on the Meadow). Simply, it seems to load forever or expires. Sometimes, it will connect (perhaps only 10% of the time). No other problems with the other computers on my network.

    When I'm on 3g it is lightning fast. So for now I just turn off wifi.

    Any suggestions?

    Since the browser if you go to the options by clicking on the Web tab in the top left, then Preferences, you can clear history, Cookies and Cache. Maybe try that.

  • In PL/SQL function call

    Hi all

    I would like to know if there is in any case to call a user defined function in a SQL statement in an anonymous PL/SQL block without having created this function to the database.

    For example:

    I have a pl/sql block:

    DECLARE

    BEGIN

    UPDATE application SET map_No = nts_map_no (parm1, parm2, parm3) WHERE...

    END;

    I tried to declare the function within the declare block section as in:

    DECLARE

    FUNCTION nts_map_no
    :
    :
    End nts_map_no;

    BEGIN

    UPDATE application SET map_No = nts_map_no (parm1, parm2, parm3) WHERE...

    END;

    But Oracle would not allow me to use it in an Update statement.

    Thank you.

    Denis

    There are a few things you can do.

    Simpler, faster: define a function stored (either packed or not) separately from your anonymous block - as BlusShadow said

    Easy, slow: definition of the function in the anonymous block, read the data that you want to update in the memory of PL/SQL, update of your function:

    declare
       function nts_map (...)
    begin
       for r in (
          select rowid, pk, map, parm1, parm2. ...
          from target
          where ...
          )
       loop
          update current of r set map = nts_map_no(parm1, parm2, parm3);
    -- or
          update target set map= ... WHERE target.rowid = r.rowid
       end loop;
    

    This treatment of line will be much slower than a single UPDATE sets. Of course the use of operations BLOCK helps - but still slow.

    Complex: If you really need to define the function in the same anonymous block, use EXECUTE IMMEDIATE - but we must be aware of dependencies (don't let not the creation of the function cancel something the rest of the anonymous block depends on...).

    SQL> r
      1  declare
      2     li_result integer;
      3  begin
      4
      5     execute immediate 'create or replace function f(p in varchar2) return integer is begin return sqrt(to_number(p)); end;';
      6
      7     select f('36') into li_result from dual;
      8
      9     dbms_output.put_line('Result='||li_result);
     10* end;
    Result=6
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    Note that the two options (1) and (3) need you to the CREATE FUNCTION - if (1) privilege is much easier and safer in most cases.

    Nigel cordially

  • Computer running much slower after a Windows Update.

    Windows Update problem

    This morning, I shut down my computer and installed the updates at the same time. When I switched back on it, he says that he has set up updates. He got 15% and then closes, rebooted and configured updates as usual. However, my computer runs much slower than usual. Any idea on how I can fix this? Thank you very much.

    Check your hard drive for errors:

    Click Start

    Type: CMD, according to the results, right-click CMD

    Click on "Run as Administrator"

    At the command prompt, type: chkdsk /f /r

    When you restart your system, your computer will be scanned for errors and will try to correct them.

    also:

    Click Start
    Type: CMD, according to the results, right-click CMD
    Click on "Run as Administrator"
    At the command prompt, type: sfc/scannow

    This will check for any breach of integrity

    Restart your system

  • accelerate CFHTTP on CF10 (5000 x slower than under CF8)

    Hi, we have freshly installed a large application of CF8 to CF10 and see that CFHTTP performance is * much * slower on the new system.

    We've checked by sequentially 50 CFHTTP to the small static active calls running on an Apache Server, measure the response time with gettickcount() and averaging on several tracks.

    On the installation of our old (Ubuntu + JRun + CF 8), we are averaging about 1 ms per request.

    On our new (Centos + CF 10 standalone) installation, we are averaging 5000 ms per request. Is 5,000 times slower.

    Initially, we have assumed that this phenomenon was linked to questions of generation of entropy as the first query in a series of tests would be relatively fast back (a few hundred Ms total) compared to all requests to this term.  However, try to change the JVM settings as prescribed is not solved the problem.  We tried more far using entropy-generating alternative tools (such as recommended in the blog original post cities in the above thread), but that did not help either one.

    Note that we also tested performance outside CF http using wget from a shell script, where we have seen good performance (about 1 ms per request).

    Any help on this will be greatly appreciated, thanks!


    Update: just tested the CFHTTP CF + http://coldfusion9.blogspot.com/2012/03/custom-cfhttp-tag.html Java-based alternative

    It took a few minor bug fixes, but is greatly outperforming CFHTTP from CF 10, with an average of 33 ms by request (always much slower than CF 8, but can be used for most of the cases).  However, I always look for a solution restore speed appropriate for CFHTTP!

    Post edited by: Jon Obuchowski to add the test with the custom CFHTTP tag

    Thank you.  I have modified the code and added 2 additional calls to the CFC HTTPRequest and CFX_HTTP5.  (I had to also modify the CFC to activate applications without the URL/form vars).

    I tried this on ColdFusion 8, 9 & 10 Windows.  I shot 50 files of 5 different internal web servers.  (WARNING: the specifications are not the same for each server CF.)

    Here are the averages.

    10 ColdFusion CFHTTP: 9.04 CFC: 18,14 CFX_HTTP5: 1.26

    ColdFusion 9 CFHTTP: 8.08 CFC: CFX_HTTP5 158.92: 2.4

    ColdFusion 8 CFHTTP: 4.86 CFC: 149.14 CFX_HTTP5: 2.14

    I posted a blog in this regard entry and shared the CFML that I used to compare performance:

    http://gamesover2600.Tumblr.com/post/88683513184/ColdFusion-CFHttp-versus-httprequestcfc-v ersus

  • CVI 2013 SP1 - function calls repeated with pointer on a variable array parameter causes a shift of the index

    I have some functions will be pointers as parameter and CVI 2012 SP1, they work as before without problems but with CVI 2013 SP1 they are now incorrect.

    Here the description of what is happening - I found a cure, but a duty adopt the old code and I think it's clear that nobody don't "captures" all lines in a 'big old code' which are affected (maybe):

    I have functions

    'function_XYZ(int *p_paraArr) '.

    with 'p_paraArr' as pointers on a table (int).

    Suppose I have another function

    "fct_TOP (void)".

    where is a local array variable which is inizialized by

    "int TheArray [25] = {0};

    and inside of this "TOP"-function-body I call a function ".

    "function_XYZ (TheArray).

    There are no complains of the compiler (CVI 2012 or 2013) and the code works (but the CVI 2013 only once!).

    But if I put 'fct_TOP' loop I have a lag in the "TheArray' -memory.  (The loop surrounds the function "TOP"! "")

    This means that the result "TheArray" obtained from "function_XYZ (TheArray)" starts at index '1' not on the index '0' - as the first time that the function "function_XYZ (TheArray)" was performed. ".

    The solution is:

    I only replaced

    "function_XYZ (TheArray)" (<1>)

    by

    "function_XYZ (&(TheArray[0]))" (<2>)

    overall the program now works every time (in the whole loop)-the first time (in the loop).

    In the second version (<2>) everything is necessary to "work well":

    The '&' and parentheses "(...)", which contains the element that may be designated by the '& '.

    And I hope that you believe me: I've tested several times, it was only "little" change that solved the problem.

    So it seems that the ICB 2013 (SP1) is a kind of internal offset index by a repeated execution of the

    "function_XYZ (TheArray).

    but I don't know how or why but I see in debug mode by observing the expected against the values in the table received!

    At the first time the (implicit) internal index of 'TheArray' is '0', but the following times (during the execution of the loop) the internal index passes to '1' (seen in the debugger because that all the expected values were shiftet like that!).

    So there's an explicit index in the table ("function_XYZ (&(TheArray[0]))") necessary to make the first time of this clear code execution.

    There are some good improvements in 2013 CVI (SP1) and I like this environment more than the 2012 version - but:

    There are other "changes" also, in the compiler (or linker...?) that are more rigid than "in ancient times.

    The problem of this kind of error is always the 'old code '!

    It is expected of such behavior.

    The compiler/linker do not complain (a complaint would be good!) writing but he made this mistake (in a loop).

    By the way: my 'compilation Options' are set to 'Extended' (without change in the "..." ("- button - Options) and that all of the boxes, except the" OpenMP_support "-box are checked!"» So I think that I put the very rigid compiler - maybe there are some «...» ' - button - settings to get rid of this problem, but I have not found them/it.

    My request:

    -Check the stiffer compiler by the need of an explicit index

    - or switch to the 'old' behavior with "function_XYZ (TheArray)" always refers to implicit index '0' of the element "TheArray". "."

    Thank you for your messages, comments and suggestions.

    -As I wrote before - maybe it's the style of programming or error"self made"... maybe...
    .. But if I replace 'function_XYZ (TheArray)' by "function_XYZ (&(TheArray[0]))" and
    then it works... Why so and not, if bothe the same? ...

    But as long as I do not post sample code, nobody is going to accept - I accept it. So consider this post more as an allusion to the fact that of the LW/CVI 2012-2013 LW/CVI more changed than just the LW - GUI or certain features: the compiler changed its 'way to'... or almost.

    For this problem, I think that I will use the solution 'use no implicit and explicit pointers'.
    Who should be a good idea taking into account
        http://forums.NI.com/T5/LabWindows-CVI/fatal-run-time-error-dereference-of-out-of-bounds-pointer/TD-...

    mybe also only caused by wrong code... who knows... but for me it is a sufficient reason to act as I suggest above.

    Best regards,
    F.

  • Retrieve the name of the function call

    I have 2 function in the CFC, even calling another function in the same CFC.

    IS anyway to get the name of the first function (the appellants) from the second?
    OR
    is there anyway inside a function to retrieve this name?

    Sounds right up your alley:

    http://www.bennadel.com/blog/406-determining-which-function-called-this-function-using-Col dFusion .htm

Maybe you are looking for