Fetching null records out of a function takes much longer than non-null

Hi,
We have a function that is called thousands of times on SQL. This function has a SELECT than can return one row at max.
We realized that when the SQL statement doesn't return any record, it takes 3x times longer in the fetch phase.
I made a simple test with three functions were each one was executed 1000 times. The first one has an extra outer join that guarantees that it always returns one record, a second one with an explicit cursor that can return 0 records and a third one with an implicit cursor that can also return 0 records.
Here is the sample test code:
DECLARE
-- Local variables here
CURSOR c IS
SELECT teste_vasco.teste_vasco1(epis.id_episode) as val
FROM episode epis
WHERE rownum <= 1000;
TYPE t_c IS TABLE OF c%ROWTYPE;
l_c t_c;
BEGIN
-- Test statements here
OPEN c;
FETCH c BULK COLLECT
INTO l_c;
CLOSE c;
          for i in l_c.first..l_c.last
          loop
          dbms_output.put_line(i || ' :' || l_c(i).val);
          end loop;
END;
The difference between the tests is that instead of calling the vasco1 function, vasco2 and vasco3 is called.
###Test1
-Function vasco1:
FUNCTION teste_vasco1(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
l_flg_stage VARCHAR2(3);
l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
CURSOR c_care_stage IS
SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
FROM episode epis
LEFT JOIN care_stage cs ON (cs.id_episode = epis.id_episode AND cs.flg_active = 'Y')
WHERE epis.id_episode = i_episode;
BEGIN
OPEN c_care_stage;
FETCH c_care_stage
INTO l_dt_set, l_flg_stage, l_dt_warn;
CLOSE c_care_stage;
IF l_dt_set IS NULL
THEN
RETURN NULL;
END IF;
RETURN l_dt_set || l_flg_stage || l_dt_warn;
EXCEPTION
WHEN OTHERS THEN
pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
pk_alert_exceptions.reset_error_state;
RETURN NULL;
END teste_vasco1;
-Trace file:
SELECT TESTE_VASCO.TESTE_VASCO1(EPIS.ID_EPISODE) AS VAL
FROM
EPISODE EPIS WHERE ROWNUM <= 1000
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.04 0.06 0 8 0 1000
total        3      0.06       0.07          0          8          0        1000
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 1)
Rows Row Source Operation
1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2035 us)
1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1030 us)(object id 153741)
SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
FROM
EPISODE EPIS LEFT JOIN CARE_STAGE CS ON (CS.ID_EPISODE = EPIS.ID_EPISODE AND
CS.FLG_ACTIVE = 'Y') WHERE EPIS.ID_EPISODE = :B1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1000 0.07 0.05 0 0 0 0
Fetch 1000 0.01 0.02 0 4001 0 1000
total     2001      0.09       0.07          0       4001          0        1000
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 2)
###Test2
-Function vasco2:
FUNCTION teste_vasco2(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
l_flg_stage VARCHAR2(3);
l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
CURSOR c_care_stage IS
SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
FROM care_stage cs
WHERE cs.id_episode = i_episode
AND cs.flg_active = 'Y';
BEGIN
OPEN c_care_stage;
FETCH c_care_stage
INTO l_dt_set, l_flg_stage, l_dt_warn;
IF c_care_stage%NOTFOUND
THEN
CLOSE c_care_stage;
RETURN NULL;
END IF;
CLOSE c_care_stage;
IF l_dt_set IS NULL
THEN
RETURN NULL;
END IF;
RETURN l_dt_set || l_flg_stage || l_dt_warn;
EXCEPTION
WHEN OTHERS THEN
pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
pk_alert_exceptions.reset_error_state;
RETURN NULL;
END teste_vasco2;
-Trace File:
SELECT TESTE_VASCO.TESTE_VASCO2(EPIS.ID_EPISODE) AS VAL
FROM
EPISODE EPIS WHERE ROWNUM <= 1000
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.27 0 8 0 1000
total        3      0.00       0.27          0          8          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 1)
Rows Row Source Operation
1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2048 us)
1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1045 us)(object id 153741)
SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
FROM
CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1000 0.03 0.05 0 0 0 0
Fetch 1000 0.00 0.00 0 2001 0 1
total     2001      0.03       0.06          0       2001          0           1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11082 us)
1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7815 us)(object id 688168)
###Test3
-Function vasco3
FUNCTION teste_vasco3(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
l_flg_stage VARCHAR2(3);
l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
BEGIN
BEGIN
SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
INTO l_dt_set, l_flg_stage, l_dt_warn
FROM care_stage cs
WHERE cs.id_episode = i_episode
AND cs.flg_active = 'Y';
EXCEPTION
WHEN no_data_found THEN
RETURN NULL;
END;
IF l_dt_set IS NULL
THEN
RETURN NULL;
END IF;
RETURN l_dt_set || l_flg_stage || l_dt_warn;
EXCEPTION
WHEN OTHERS THEN
pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
pk_alert_exceptions.reset_error_state;
RETURN NULL;
END teste_vasco3;
-Trace file:
SELECT TESTE_VASCO.TESTE_VASCO3(EPIS.ID_EPISODE) AS VAL
FROM
EPISODE EPIS WHERE ROWNUM <= 1000
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.25 0.27 0 8 0 1000
total        3      0.25       0.27          0          8          0        1000
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 1)
Rows Row Source Operation
1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2033 us)
1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1031 us)(object id 153741)
SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
FROM
CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1000 0.07 0.06 0 0 0 0
Fetch 1000 0.00 0.00 0 2001 0 1
total     2001      0.07       0.06          0       2001          0           1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11119 us)
1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7951 us)(object id 688168)
As you can see, in the first example the fetch time of the SELECT in the function vasco1 takes 0.02 seconds and 0.06 in the SELECT of the test script. This test returned 1000 non-null records.
In the tests 2 and 3, the fetch phase of the SELECT in the test script takes much more time - 0.27 seconds, despite the fetch of the SELECT in the functions (vasco2 and vasco3) took 0.00 seconds (as it only returned 1 row for the 1000 executions) and the only difference between them is the function that is called. Both test2 and test3 returned 999 null records and 1 non-null record.
How it's possible than a select null records takes much longer than selecting non-null records?
Hope you can understand the problem and thank you in advance for any help or suggestions.

Thank you for the replies...
But the thing is that the SELECT in the function is very fast and the fetch phase takes no time (0.00 second).
And, as you can see in the execution plan, there's no need for a full index scan...only a range scan is performed:
SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
FROM
CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1000 0.07 0.06 0 0 0 0
Fetch 1000 0.00 0.00 0 2001 0 1
total     2001      0.07       0.06          0       2001          0           1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 286 (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11119 us)
1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7951 us)(object id 688168)
But, the fetch phase of the SQL that calls the function that has this query takes 0,27 seconds.
As far as the contex switch, we are aware of that, but we can have modularity with this solution and the first function also have many context switching and is must faster.
Edited by: Pretender on Mar 18, 2009 3:38 PM

Similar Messages

  • AE CC - saving projects takes much longer than in CS6

    I've noticed that After Effects CC takes much longer to save my current project than previously (about 2-3 minutes). I'm used to saving quite often so this is slowing down my workflow.
    The project was imported from AE CS6. I've tried starting a new project and importing the previous one manually (instead of a conversion). Same lag.
    All unused footage has been taken out and the footage has been consolidated.
    The AE CS6 project file and AE CC file are about 15mb so CC is not any bigger.
    There are about 50 files in Arri Raw 3K, the rest is in DPX and ProRes 1080p.
    I'm working from a Macbook Pro Retina 16GB Ram and all media and cache are on an external Lacie Big Disk thunderbolt Raid SSD.
    My impression is that AE CC is indexing all the files before saving so it's going through all the RAW sequenced files. This could slow down the saving process quite a lot.
    Is anyone experiencing the same lag time while saving projects?

    I'm having the same issue on my PC, saving is taking much longer and is also happening every time I RAM preview. Very strange, and in fact now its having trouble accessing the save location, a local hard drive. any answers for this isse?

  • Prepared statement takes much longer than statement..

    Hi community,
    At the moment I'm trying to migrate my j2ee application from DB2 to Oracle. I'm using database version 10.2.0.3 and driver version 10.2.0.4.
    After copying all data from DB2 to Oracle, I've started testing the application with the new database. During this process, a problem occurs when using prepared statements.
    For example, when I'm trying to execute the following sql statement:
    SELECT
    LINVIN.BBASE , INVINNUM , INVINNUMALT , LINVIN.LSUPPLIERNUM , LINVIN.COMPANYCODE , ACCOUNT , INVINTXT , INVINSTS , INVINTYP , INVINDAT , RECEIPTDAT , POSTED , POSTINGDATE , CHECKCOSTCENTER , WORKFLOWIDEXT , INVINREFERENCE , RESPONSIBLEPERS , INVINSUM , INVINSUMGROSS , VOUCHERNUM , HASPOSITIONS , LSUPPLIER.AADDRLINE1
    from LINVIN, LSUPPLIER
    where LINVIN.BBASE = LSUPPLIER.BBASE
    and LINVIN.LSUPPLIERNUM = LSUPPLIER.LSUPPLIERNUM
    and LINVIN.BBASE = ? and LINVIN.INVINNUM = ?
    order by LINVIN.BBASE, LINVIN.INVINDAT DESC
    The execution time, when using a simple java.sql.Statement, amounts to 100 millis. But if I execute the same statement with a java.sql.PreparedStatement it takes about 30.000 millis.
    I tried to do a explain plan on both types with the following results:
    With java.sql.Statement:
    PLAN_TABLE_OUTPUT
    Plan hash value: 1286706273
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 1 | 225 | 4 (0)| 00:00:01 |
    | 1 | NESTED LOOPS | | 1 | 225 | 4 (0)| 00:00:01 |
    | 2 | TABLE ACCESS BY INDEX ROWID| LINVIN | 1 | 136 | 3 (0)| 00:00:01 |
    |* 3 | INDEX UNIQUE SCAN | PK_2540516 | 1 | | 2 (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    | 4 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 16922 | 1470K| 1 (0)| 00:00:01 |
    |* 5 | INDEX UNIQUE SCAN | PK_177597 | 1 | | 0 (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    3 - access("LINVIN"."BBASE"='PRAK' AND "LINVIN"."INVINNUM"='0010344820')
    5 - access("LSUPPLIER"."BBASE"='PRAK' AND
    "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    With java.sql.PreparedStatement:
    PLAN_TABLE_OUTPUT
    Plan hash value: 957014775
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 37 | 8325 | | 5850 (1)| 00:01:11 |
    | 1 | MERGE JOIN | | 37 | 8325 | | 5850 (1)| 00:01:11 |
    |* 2 | TABLE ACCESS BY INDEX ROWID| LINVIN | 34 | 4624 | | 3442 (1)| 00:00:42 |
    |* 3 | INDEX FULL SCAN | LINVOICE_LSUPPLIER_FK | 3410 | | | 999 (2)| 00:00:12 |
    PLAN_TABLE_OUTPUT
    |* 4 | SORT JOIN | | 101K| 8824K| 19M| 2408 (1)| 00:00:29 |
    | 5 | INDEX FAST FULL SCAN | LSUPPLIERAL1 | 101K| 8824K| | 329 (1)| 00:00:04 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    2 - filter(SYS_OP_C2C("LINVIN"."INVINNUM")=:2)
    3 - filter(SYS_OP_C2C("LINVIN"."BBASE")=:1)
    4 - access("LINVIN"."BBASE"="LSUPPLIER"."BBASE" AND
    "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    filter("LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM" AND
    "LINVIN"."BBASE"="LSUPPLIER"."BBASE")
    I checked the tables and the indexes and everything looks fine. I have an index over the where clause (PK), the order by clause and the join criterias. I also analyzed the tables and the indexes and also started a rebuild on them.
    Indexes table LINVIN:
    PK_2540516 --> index on LINVIN(BBASE, INVINNUM)
    LINVOICE_LSUPPLIER_FK --> index on LINVIN(BBASE, LSUPPLIERNUM)
    LINV_INVDAT --> index on LINVIN(BBASE, INVINDAT DESC)
    Indexes table LSUPPLIER:
    PK_177597 --> index on LSUPPLIER(BBASE, LSUPPLIERNUM)
    LSUPPLIERAL1 --> index on LSUPPLIER(BBASE,LSUPPLIERNUM,AADDRESSLINE1) [why is Oracle using this index, when addressline1 isn't in the statement?]
    Can somebody tell me please, why the prepared statement takes a completely different way than the normal statement and how can I get the prepared statement working like the other?
    I would really appreciated, if somebody can help me with this issue, because I'm really getting more and more distressed...
    Thanks in advance,
    Tobias

    With java.sql.Statement:
    Predicate Information (identified by operation id):
    > 3 - access("LINVIN"."BBASE"='PRAK' AND
    "LINVIN"."INVINNUM"='0010344820')> 5 - access("LSUPPLIER"."BBASE"='PRAK' AND
    >
    LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    With java.sql.PreparedStatement:
    Predicate Information (identified by operation id):
    > 2 - filter(SYS_OP_C2C("LINVIN"."INVINNUM")=:2)
    3 - filter(SYS_OP_C2C("LINVIN"."BBASE")=:1)> 4 - access("LINVIN"."BBASE"="LSUPPLIER"."BBASE"
    AND
    LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    ilter("LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNU
    M" AND
    "LINVIN"."BBASE"="LSUPPLIER"."BBASE")
    the tables and the indexes and everything looks fine.Notice the SYS_OP_C2C function Oracle is applying in your code with the prepared statement, it is doing this because the bind variable is not of the same data type as your column. So it's taking your column in the table, applying a function to convert it into the same data type as your bind variable (which destroys any possibility of using an index).
    If you ensure the prepared statement is binding type for type this should magically go away.

  • Since I upgarded to Firefox 4 Clearing recent history takes much longer than ever. Does anyone know why?

    running Windows XP

    The browser cache is a bit more complicated in 4.0 than it was in previous versions, so it may take a bit longer to clear.

  • Saving images takes much longer now?

    About six weeks ago, saving images started to take much longer than they used to
    . Elements 11.

    I have been doing all kinds of editing - it doesn't seem to make much difference what or if I save as JPEG or TIFF. I am using Windows 7. I am saving to the original folder. I have saved and closwed these files from the Editor. The Organizer freezes and I just have to wait to do anything else?
    Thanks

  • After installing VS 2013 my Excel/Word/PowerPoint 2010 student edition takes much longer to start-up...

    Hi,
    After installing Visual Studio Community 2013, my Excel/Word/PowerPoint 2010 student edition takes much longer to start-up. Whenever I open Excel/Work/PowerPoint, the Windows Installer configures VS Studio 2013 each time. Is this the normal behavior, can
    I stop this?

    Thank you for your response.
    I actually found the answer I was looking for through a couple of URL's below:
    1. This first URL walked me through everything I needed to do find the actual warning using the Event Viewer and then the fix. There are two command for the suggested fix (remove and addlocal registry items) but since I don't think MS Office 2010 student
    edition came with VBA support (I could be wrong), I only did the REMOVE command. After that, launching my Office apps now only takes  a couple of seconds instead of 2-3 minutes. Here's the first URL (http):
    Since I'm not allowed to post a link yet:
    The blog is from MSDN by Heath Stewart (MSFT) dated May 29, 2009 "how-to-workaround-the-issue-when-opening-office-applications-repairs-visual-studio"
    2. The second URL (https) below is from a forum with similar issue that confirmed what I had to do. In this forum the helpee ran the suggested two commands and had the same warning:
    Since I'm not allowed to post a link yet:
    This next URL is from Anne Jing's thread dated Jan 6-9, 2015: 
    So, I decided to do as helpee did.
    Here are the details of my challenge and the fix I ran following the first URL above:
    Following is the actual warning I was getting when launching Office apps:
    Log Name:      Application
    Source:        MsiInstaller
    Date:          1/23/15 12:12:30 PM
    Event ID:      1001
    Task Category: None
    Level:         Warning
    Keywords:      Classic
    User:          Gerry-pavg6-HP\Gerry-pavg6
    Computer:      Gerry-pavg6-HP
    Description:
    Detection of product '{9C593464-7F2F-37B3-89F8-7E894E3B09EA}', feature 'VB_for_VS_7_Pro_11320_x86_enu' failed during request for component '{9DE325B8-0C09-49EB-99AE-12284811D61C}'
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MsiInstaller" />
        <EventID Qualifiers="0">1001</EventID>
        <Level>3</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-01-23T17:12:30.000000000Z" />
        <EventRecordID>51710</EventRecordID>
        <Channel>Application</Channel>
        <Computer>Gerry-pavg6-HP</Computer>
        <Security UserID="S-1-5-21-3985824742-3742285712-2182756392-1002" />
      </System>
      <EventData>
        <Data>{9C593464-7F2F-37B3-89F8-7E894E3B09EA}</Data>
        <Data>VB_for_VS_7_Pro_11320_x86_enu</Data>
        <Data>{9DE325B8-0C09-49EB-99AE-12284811D61C}</Data>
        <Data>(NULL)</Data>
        <Data>(NULL)</Data>
        <Data>(NULL)</Data>
        <Data>
        </Data>
      </EventData>
    </Event>
    Fix: 
    I only run the 'REMOVE' command below for now because I didn't want to reinstall VS 2013 from the Internet, it needs >7GB to download) Jan23/15:
    'REMOVE'
    start /wait msiexec.exe /i {9C593464-7F2F-37B3-89F8-7E894E3B09EA} /L*vx "%TEMP%\1.remove.log" REMOVE=VB_for_VS_7_Pro_11320_x86_enu
    'ADDLOCAL'
    start /wait msiexec.exe /i {9C593464-7F2F-37B3-89F8-7E894E3B09EA} /L*vx "%TEMP%\2.addlocal.log" ADDLOCAL=VB_for_VS_7_Pro_11320_x86_enu TARGETDIR="%ProgramFiles%\Microsoft Visual Studio
    10.0"
    Note: Please ensure to open the first URL above and follow the steps when running the REMOVE and ADDLOCAL commands above.

  • After installing update takes much longer to go to sleep

    After I installed the latest security update (2005-08) I noticed that my powerbook takes much longer now to go to sleep. In fact it can now take somewhere around 30 seconds to finally show me the blinking eye (or whatever that is called). Before the update, it went to sleep in just a few seconds, it never took that long. Has anyone else noticed this behavior?
    This is a powerbook G4 with 10.4.2.

    Ok, please forget about this post. It's amazing what a reboot can do
    nick

  • I updated to mountain lion, i have a macbook air and now when i shut it down, it takes incredibly longer than before to get off! why??

    i updated to mountain lion, i have a macbook air and now when i shut it down, it takes incredibly longer than before to get off! why??

    The honeymoon is over?

  • Save takes MUCH longer with images placed

    When I have images placed in Illustrator, even just a few small ones, Save takes much longer..so long that it can be 20 seconds before I even see the progress bar, and after that the saving actually happens.
    Is there a way around this, or are we stuck wtih mind-numbing save times when we have raster elements placed in Illustrator?
    thank you!
    CS6, OS X 10.8.4
    w

    when you 'place' images, they may, by default, be embedded...
    unless you check the 'link' box

  • When purchased, my imac would load pages very quickly.  Now, the pages seem to take much longer to load and when watching video or streaming, it often stops to catch up or rebuffer.  What do I do to speed things up?

    When I purchased my iMac last month the pages would load quickly when using the internet browser.  Now it takes much longer to load the pages and when I watch a video it pauses to catch up or is rebuffering the streaming.  What can I do to speed up my browser?

    See:
    Mac Maintenance Quick Assist,
    Mac OS X speed FAQ,
    Speeding up Macs,
    Macintosh OS X Routine Maintenance,
    Essential Mac Maintenance: Get set up,
    Essential Mac Maintenance: Rev up your routines,
    Maintaining OS X, 
    Five Mac maintenance myths, and
    Myths of required versus not required maintenance for Mac OS X for information.

  • It takes much longer time to power down.

    Since i upgraded to mountainlion it takes much longer time to power down. As if the harddisk is being scanned. Anyone any thoughts on that ?
    greetz,

    Since i upgraded to mountainlion it takes much longer time to power down. As if the harddisk is being scanned. Anyone any thoughts on that ?
    greetz,

  • After turning on, it takes much longer time to turn on. all the functions don't work.have to wait a long time

    After I turn on my macbook, it takes a much longer time to turn on. I can move around the arrow, but nothing works. I tried to click every app, no response. I have to wait a long time and then everything works. Did I do something wrong?
    Thanks

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Calling a library function node much faster than labview code?

    Hi,  I wrote a labview routine to perform a multiple tau autocorrelation on a large array of integers.  A multi tau autocorrelation is a way to reduce the computation time of the correlation but at the expense of resolution.  You can taylor the multitau correlation to give you good resolution where you need it.  For instance, I require good resolution near the middle (the peak) of the correlation, so I do a linear autocorrelation for the first 64 channels from the peak, then I skip every second channel for the next 32, then skip every 4th channel for 32 more, then skip every 8th for 32 channels... etc.
    Originally, I wrote my own multitau calculation, but it took several hours to perform for just 1024 channels of the correlation of around 2million points of data.  I need to actually do the the correlation on probably 2 billion or more points of data, which would take days.  So then I tried using labview's AutoCorrelation.vi which calls a library function.  It could do a linear autocorrelation with 4 million points in less than a minute.  I figured that writing my code in C and calling it using a call library function node would be faster, but that much faster?
    Finally, I wrote some code that extracts the correlation data points that I would've got from my multitau code from the linear correlation function that I get from the AutoCorrelation.vi.  Clearly this is not optimal, since I spend time calculating all those channels of the correlation function just to throw them away in the end, but I need to do this because the final step of my procedure is to fit the correlation function to a theoretical one.  With say 2million points, the fit would take too long.  The interesting thing here is that simply extracting the 1024 point from the linear autocorrelation function takes a significant amount of time.  Is labview really that slow?
    So, my questions are...  if I rewrite my multitau autocorrelation function in C and call it using a call library function node, will it run that much faster?  Can I achieve the same efficiency if I use a formula node structure?  Why does it take so long just to extract 1024 points from an array?
    I've tried hiding indicators and this speeds things up a little bit, but not very much.
    I'll attach my code if you're interested in taking a look.  There is a switch on the front panel called 'MultiTau'... if in the off position, the code performs the linear autocorrelation with the AutoCorrelation.vi, if in the on position, it performs a multitau autocorrelation using the code I wrote.  Thanks for any help.
    Attachments:
    MultiTauAutocorrelate.vi ‏627 KB

    Hi,
    The C routine that AutoCorrelation.vi is using is probably a higly optimised routine. If you write a routine in LabVIEW, it should be less then 15% slower. But you'd have to know all ins and outs of LabVIEW. How data is handled, when memory is allocated, etc. Also note that the AutoCorrelation.vi has years of engineering behind it, and probably multiple programmers.
    It might even be possible that the c code uses an algorithmic improvement, like the Fast Fourier Transform improves speed on the Fourier Transform. I think the autocorrelation can be done using FFT, but that isn't my thing, so I'm not sure.
    For a fair comparation, posting the code in this forum was a good idea. I'm sure together we can get it to 115% or less of the C variant. (15/115 is just a guess, btw)
    I'm still using LV7.1 for client compatibility, so I'll look at the code later.
    Regards,
    Wiebe.
    "dakeddie" <[email protected]> wrote in message news:[email protected]...
    Hi,&nbsp; I wrote a labview routine to perform a multiple tau autocorrelation on a large array of integers.&nbsp; A multi tau autocorrelation is a way to reduce the computation time of the correlation but at the expense of resolution.&nbsp; You can taylor the multitau correlation to give you good resolution where you need it.&nbsp; For instance, I require good resolution near the middle (the peak) of the correlation, so I do a linear autocorrelation for the first 64 channels from the peak, then I skip every second channel for the next 32, then skip every 4th channel for 32 more, then skip every 8th for 32 channels... etc. Originally, I wrote my own multitau calculation, but it took several hours to perform for just 1024 channels of the correlation of around 2million points of data.&nbsp; I need to actually do the the correlation on probably 2 billion or more points of data, which would take days.&nbsp; So then I tried using labview's AutoCorrelation.vi which calls a library function.&nbsp; It could do a linear autocorrelation with 4 million points in less than a minute.&nbsp; I figured that writing my code in C and calling it using a call library function node would be faster, but that much faster?Finally, I wrote some code that extracts the correlation data points that I would've got from my multitau code from the linear correlation function that I get from the AutoCorrelation.vi.&nbsp; Clearly this is not optimal, since I spend time calculating all those channels of the correlation function just to throw them away in the end, but I need to do this because the final step of my procedure is to fit the correlation function to a theoretical one.&nbsp; With say 2million points, the fit would take too long.&nbsp; The interesting thing here is that simply extracting the 1024 point from the linear autocorrelation function takes a significant amount of time.&nbsp; Is labview really that slow?So, my questions are...&nbsp; if I rewrite my multitau autocorrelation function in C and call it using a call library function node, will it run that much faster?&nbsp; Can I achieve the same efficiency if I use a formula node structure?&nbsp; Why does it take so long just to extract 1024 points from an array?I've tried hiding indicators and this speeds things up a little bit, but not very much.I'll attach my code if you're interested in taking a look.&nbsp; There is a switch on the front panel called 'MultiTau'... if in the off position, the code performs the linear autocorrelation with the AutoCorrelation.vi, if in the on position, it performs a multitau autocorrelation using the code I wrote.&nbsp; Thanks for any help.
    MultiTauAutocorrelate.vi:
    http://forums.ni.com/attachments/ni/170/185730/1/M​ultiTauAutocorrelate.vi

  • Upgraded to OSX 10.9.1 and now Pages (iWork '08) takes much longer to launch.

    Initial launch of Pages takes significantly longer to load after upgrading OSX.  I have used 'software update', but nothing out there to download.  Any ideas?  The other components of my iWork '08 bundle work as expected, it is only Pages that seems to have performance issues under OSX 10.9.1.

    If I remember, I believe I thought I had to upgrade to Mavericks for a feature related to sharing or FaceTime or something.  I have an iMac, 2 MacBook Pro laptops (kids), an iPad (wife's) and Apple TV.  So on Mavericks, everyone in the house is happy now; I just don't like that it takes 'forever' to launch Pages.  Perhaps I will upgrade to iWork '09 to see if that takes care of the issue.

  • Why Safari takes much long time than other browser to open a page?

    I have used windows since start of my computing life... Now i have replaced my windows laptop to a macbook pro.. Everything is amazing.. except only one. Safari.. I experience it takes too long time for openning a webpage...even for a simple webpage...takes much more time for loading a flash... I dont know why Safari is taking too many times as compared to other web browsers...

    I found the same problem too after moving into mac earlier this week....
    i guess here's the solution https://discussions.apple.com/thread/5227588
    try uninstall/unable the third party extension

Maybe you are looking for