CVI XML Functions Execution Times Increase When Looped
I have written multiple functions using CVI that read XML files. I have confirmed in the Resource Tracking utility that i have cleaned up all of my lists, elements, documents, etc. I have found that when I loop any of the functions I have created, the execution times increase. The increase is small but it is noticable and does effect my execution.
Are there any other sources of memory that I need to deallocate? It seems that there is a memory leak somewhere but I am unable to see where this increase is located.
I am currently running LabWIndows/CVI 2009 on Windows 2008 Server. I have looped my functions using TestStand 4.2.1. Any help would be appreciated!
Thanks in advance,
Kyle
Solved!
Go to Solution.
HI Daniel,
Thanks for the quick response.
It is indeed slow down in execution speed when we loop. When looped, the XML reader is overwriting variables, not adding to an array. Our application is structured differently than my test case. We run a CVI function from TestStand that contains a series of commands, which contains the XML reading. The XML looping is really done in CVI. I used TestStand in my test case just to get execution times. Our psuedocode for the CVI function is as followed:
For loop (looping over values, like amplitude or frequency)
Reading the XML
Applying the data from the XML to set up some instrument(s)
Do something...
End loop
I can confirm that the instrument set up is not the cause of the slow down. We have written the same XML reading in C# and applied the values to the instrument setup and do not experience the slow down.
I tested with On-The-Fly Reporting enabled and the execution time continued to slow down.
I hope that answers all of your questions!
Thanks,
Kyle
Similar Messages
-
Why the execution time increases with a while loop, but not with "Run continuously" ?
Hi all,
I have a serious time problem that I don't know how to solve because I don't know exactly where it comes from.
I command two RF switches via a DAQ card (NI USB-6008). Only one position at the same time can be selected on each switch. Basically, the VI created for this functionnality (by a co-worker) resets all the DAQ outputs, and then activates the desired ones. It has three inputs, two simp0le string controls, and an array of cluster, which contains the list of all the outputs and some informations to know what is connected (specific to my application).
I use this VI in a complex application, and I get some problems with the execution time, which increased each time I callled the VI, so I made a test VI (TimeTesting.vi) to figure out where the problem came from. In this special VI I record the execution time in a csv file to analyse then with excel.
After several tests, I found that if I run this test VI with the while loop, the execution time increases at each cycle, but if I remove the while loop and use the "Run continuously" funtionnality, the execution time remains the same. In my top level application I have while loops and events, and so the execution time increases too.
Could someone explain me why the execution time increases, and how can I avoid that? I attached my test VI and the necessary subVIs, as well as a picture of a graph which shows the execution time with a while loop and with the "run continuously".
Thanks a lot for your help!
Solved!
Go to Solution.
Attachments:
TimeTesting.zip 70 KB
Graph.PNG 20 KBjul7290 wrote:
Thank you very much for your help! I added the "Clear task" vi and now it works properly.
If you are still using the RUn Continuously you should stop. That is meant strictly for debugging. In fact, I can't even tell you the last time I ever used it. If you want your code to repeat you should use loops and control the behavior of the code.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
hai guys,
Im currently developing a code that run 24 hours 7 days a week. My problem is the execution time increases as days pass by. As im tracing down the execution time ,the 1st day i start the to run the program execution time is 0.04 second but after 3 day it increases to 4.5 seconds .
then i indually tracked down the subvi that causing problem and find out that the problem is on writing to ini file.
The subvi function is to REPLACE the data (20 data )in a file every 10 second*not accumulating data just replace the old data . I open file replace data and close file every itteration and as day pass the execution time for this subvi increases.
Can any one help me to get a solution for the problem as time is a very important factor in my programming. the execution time is limited for less that 10 second.
thanks
regards
kokulaAs David said, post the code.
Is there any reason why your are loggin to an .ini file? Does that mean you are using the LabVIEW config file functions?
I don't know if deallocating memory would help, or is even possible, without seeing your code. You either have a problem with resources continuously being created, but not being closed out. Or you have an ever growing array. This takes more memory over time, and slows down the code because LabVIEW has to move memory around to account for the ever larger array.
I bet if you let your program run long enough, it would eventually crash due to running out of memory.
By the way 47MB to 350 MB of memory consumption means the same thing as RAM usage increasing. -
"IMAQdxOpenCamera" function execution time is particularly long,why?
I install VAS2011 in CVI2010 environment, running IMAQdx the samples <Grab and AttributesSetup>, "IMAQdxOpenCamera" function execution time is particularly long, more than 7 seconds,why?
Thanks!
Solved!
Go to Solution.Thank you for your answers!
I capture video using VFW initialization faster, only use IMAQdx speed slow.
thanks! -
Procedure/Function execution time
I want to get my procedure/function total execution time which is running inside of application.
I think that I can use PLSQL_EXEC_TIME column of v$sql time. Please confirm this if I can or not.Hi;
Please see:
http://www.orafaq.com/maillist/oracle-l/2004/01/27/0522.htm
http://www.dbforums.com/microsoft-sql-server/1625184-how-catch-stored-procedure-execution-time.html
http://www.geekinterview.com/talk/9466-procedure-execution-time.html
Regard
Helios -
ADF11g page rendering time increases when used continuously for 2-3 hours
Hi,
We have an ADF11G application running on weblogic 10.3.2.0. After using the application for 2-3 hours, the page rendering time increases. Looking at the JVM performance graph from the enterprise manager, I found that the JVM memory usage are 1.8 GB, we have allocated 2 GB of memory to the soa_server1 on which this ADF application is deployed.
I'm surprised why this much memory is consumed. Can anyone please point out what could be the issue. Is the ADF11G components which are consuming so much memory?
Our Manager server soa_server1 also has BPEL components deployed on it. Is it advisable to use a separate managed server for ADF applications or it is very normal to use ADF and SOA components deployed on the same managed server?
Thanks in advance for any suggestions.
Thanks,
MakrandHi,
We have an ADF11G application running on weblogic 10.3.2.0. After using the application for 2-3 hours, the page rendering time increases. Looking at the JVM performance graph from the enterprise manager, I found that the JVM memory usage are 1.8 GB, we have allocated 2 GB of memory to the soa_server1 on which this ADF application is deployed.
I'm surprised why this much memory is consumed. Can anyone please point out what could be the issue. Is the ADF11G components which are consuming so much memory?
Our Manager server soa_server1 also has BPEL components deployed on it. Is it advisable to use a separate managed server for ADF applications or it is very normal to use ADF and SOA components deployed on the same managed server?
Thanks in advance for any suggestions.
Thanks,
Makrand -
Execution time for while-loops?
Hi,
How can I measure the time used during one iteration in a while-loop?
DennisPrior to the loop get the time. Initialize a shift register in the loop with that time. Now - at the end of the code in the while loop get the time once again, and find the difference between the value in the shift register and the new time. Wire the new time to the right hand shift register terminal...when you loop the difference will now tell how long each iteration takes.
In the attached example I have usied the get ms timer value to get the current time. The ms timer loops though so there is a possibility that it will give an incorrect value just when it resets...normally that's not a big problem, unless you want to do something critical based on the loop time...
In the example the loop code is just an add operation and a wait until next multiple (to
make the loop use some time), you can remove all that and put in your own code, or better - just add the timer code to your own loop.
PS. The example illustrates one thing about the wait next ms function that people sometimes overlook; the first time it is run it does not have a start value to relate to so it won't wait the specified number of ms on the first iteration.
MTO
Attachments:
TimeTheLoop.vi 21 KB -
Query Execution time differs when executed inside a procedure
Hi All,
Oracle 10.2.0
Windows 2003 server
We have a query that runs faster when it is executed as a seperate query.
But its taking time when it is executed as a procedure.
Please advice to find the problem.
TIA,ORCLDB wrote:
Hi All,
Oracle 10.2.0
Windows 2003 server
We have a query that runs faster when it is executed as a seperate query.
But its taking time when it is executed as a procedure.
Please advice to find the problem.
TIA,You should be able to enable a 10046 trace at level 12 for each execution environment, and examine the STAT lines in the raw trace files to see how the execution plans differ, and if bind variables are used, to see if those bind variables are defined as an incorrect data type. Search the forums to see how to enable a 10046 trace and read the resulting trace files.
Here is a post which shows how to read the trace files. I probably posted a couple times in the past how to enable a 10046 trace:
Re: some 10046 traceing questions.....
Are you running 10.2.0.1, 10.2.0.2, 10.2.0.3, or 10.2.0.4?
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
ETL execution time want to reduce
Hi Everybody,
I am working on owb 10g with R2.
Environment is win 2003 server 64bit itanium server,
oracle 10 database in netap server mapped as I drive on 186 server where owb installed.
source files : oracle's staging schema
target : oracle target schema
Problem :
The problem is before 1 month our ETL process was taking 2 hrs to complete .
now a days 5 hrs...i dont know why.
any body suggest what I need to check in owb.
for optimization.Thanks for reply sir,
as you suggest a query for checking the execution time in desc order, I am sending you little bit o/p for today date execution.
MAP_NAME
START_TIM END_TIME ELAPSE_TIME NUMBER_ERRORS NUMBER_LOGICAL_ERRORS
NUMBER_RECORDS_SELECTED NUMBER_RECORDS_INSERTED NUMBER_RECORDS_UPDATED
NUMBER_RECORDS_DELETED NUMBER_RECORDS_DISCARDED NUMBER_RECORDS_MERGED
"M_CONTRACT_SUMMARY_M2__V_1"
20-NOV-07 20-NOV-07 1056 0 0
346150 0 346052
0 0 0
MAP_NAME
START_TIM END_TIME ELAPSE_TIME NUMBER_ERRORS NUMBER_LOGICAL_ERRORS
NUMBER_RECORDS_SELECTED NUMBER_RECORDS_INSERTED NUMBER_RECORDS_UPDATED
NUMBER_RECORDS_DELETED NUMBER_RECORDS_DISCARDED NUMBER_RECORDS_MERGED
"M_POLICY_SUSPENCE_V_1"
20-NOV-07 20-NOV-07 884 0 0
246576 0 0
0 0 246576
MAP_NAME
START_TIM END_TIME ELAPSE_TIME NUMBER_ERRORS NUMBER_LOGICAL_ERRORS
NUMBER_RECORDS_SELECTED NUMBER_RECORDS_INSERTED NUMBER_RECORDS_UPDATED
NUMBER_RECORDS_DELETED NUMBER_RECORDS_DISCARDED NUMBER_RECORDS_MERGED
"M_ACTIVITY_AMT_DETAIL_M3_V_1"
20-NOV-07 20-NOV-07 615 0 0
13927 13927 0
0 0 0
==================================
I think Elapse time depend on No of rec selected and inserted merge wahtever be...if rec are reduce then time also reduce but compare to before (when ETL got finished within 2 hrs), so we got more than 100 sec's diffrence b/w that time and now .
source tables analyzed daily before mapping execution started. and target tables analyzed at evening time .
As a remeber from last that day nothing any major changes made in ETL mappings. one day there was a problem arise that source_loc for another Process Wonders ( As i told before there are total 3 main Process runs Sun , Wonders and Life_asia,in which sun and wonders are scheduled) so we have correct that loc and deployed the all mappings as requier msg from control center.
then mappings runs fine but Execution time increased by 1 hrs more(5 hrs+) than before (3-4hr).
and normal time was
2 hrs for LifeAsia.
30 mnt for wonders
15 mnts for Sun.
Can you Suggest me what i can do for temp/permanent solution of this problem.
according to our System config...
1 tb hdd.in which 2-300 gb free
4 gb ram
64 bit windows os
Used temp tablespace 99 % with auto-extendable
Used target table space 93-95%....
data load incrementaly daily.
load window was 5am to 8 am which is now a days going upto 12 .30 pm
after which matview going to refresh.
after which reports and cubes refresh.
So all process going to delay and this is live process .
suggest me if any info u want .
abt hardware config , we need to increase some...? like ram ....memory..etc.
@wait for reply... -
What to do if data grows heavily.How to decrease the execution time
Procedure execution time increases from 1 minute to 40 minutes in the past three years. I think this is due to increase in size of tables. We are maintaining the database from last 6years. Nearly 25,000 records are adding per month in a table. Now each contains above 12Lakh records. I already used Query Optimization techniques. So please suggest me what to do.
So, does this process need to access the whole table or is it just interested in the last months records?
I already used Query Optimization techniques.meaning what precisely???
So please suggest me what to do.Without knowing a whole bunch more about your situation we cannot give you a solution. You have one slow process. So what? For instance, let's presume this is a batch process that runs once a month. Does a forty minute elapsed time matter compare to processes that are used by all your users many times every day? Are you prepared to risk the performance of those OLTP functions to improve the runtime of that batch process?
Cheers, APC -
Hi All,
We are trying to execute coded UI scripts without Visual Studio installed. We are using “Visual Studio Test Agent 2010” for executing coded UI scripts without VS2010 in Windows 7, it is working fine. Also we verified executing the same script with VS2010
Premium, it works fine as well.
Here the challenge we are facing is with the Test execution time.
When we run the coded UI script with IE11-Windows 7 OS-Visual Studio 2010 Premium it takes
3min 36sec to complete the execution whereas with IE11-Windows 7 OS-Visual Studio Test Agent 2010 it takes
6min 40sec for the same script to execute (which is almost double the time it takes while executing using VS2010).
My question is what may be the reason for this difference? and how we can reduce the test execution time when running from Test Agent 2010?
Kindly let us know what is the best practice to execute the coded UI scripts with least test execution time in Windows 7 Operating system using Visual Studio Test Agent 2010 without VS2010
installed.
Looking forward for your positive response.
Thanks in advance..!!Tina-Shi, Thanks for the information.
As you mentioned, we tried to execute the coded UI test using Mstest.exe in command on VS2010 Premium and checked on the execution
time, there was a slight difference.
Please find below execution time.
Using Mstest.exe in command on VS2010 Premium/Win7 – 3.47 minutes
Using VS2010 Premium/Win7 – 3.53 minutes
Using Test Agent/Win7 – 7.3 minutes
Also, I closed all the other processes in Task manager before starting up the execution.
Still , I am facing the same Issue. Could you please suggest any other way to reduce the scripting time of coded UI script execution
through Test agent 2010.
Looking forward for your earliest response. -
Hi,
I am executing a query using parallel hint whose execution time varies when i am executing it continuously.
I created all the required indexes and the query uses all those indexes.
For example ::
1st time ---->3.20 sec
2nd time ---->1.34 sec
3rd time ----->5.41 sec
4th time ----->2.5 sec
5th time ----->5.8 sec
Can any one explain me why it is taking different execution time.
Thanks
srikarTRACE/TKPROF will give you exact timings.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01010
http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
http://www.oracle-base.com/articles/8i/TKPROFAndOracleTrace.php
Don't expect the execution time of a query to be always 100% the same if you run that query multiple times.
Workload changes, data changes, what's in LRU/MRU changes, etc. -
Why does that entire thread goes to sleep when we put a wait function in time critical loop?
why does that entire thread goes to sleep when we put a wait function in time critical loop but not when it is not time critical
Norbert B wrote:
Ujjval,
in a RT system, priorities have (in general) increased effect on the execution of the application.
It is recommended that you only have a single task in your RT program at "time critical". If you have two task "time critical" (that means you are running into issues caused by your quoted "feature"), you have a flaw in your application architecture.
Since LV 7.1, it is recommended to work with Timed Loops in order to prioritize tasks on a RT system. Timed Loops are executed on priorities between "time critical" and "above normal". Each Timed Loop will execute its content in a single thread in order to keep a good overview of the timing (like finished late [i-1]). Using those structures (and according settings) in a reasoned manner will prevent your RT system to run into priority issues.
Ujjval Shah wrote:
[...]also i would really appreciate if i can get more documentations regarding how LV creates threads and assigns subvis to them[...]
You will have a real hard time to go into this very deep. This is the feature of LV: you can just use multithreading (multicores) without the needed knowledge of scheduling and load balancing. This makes LV programming in general very easy in comparison to e.g. ANSI C (in regard of multithreading). So creation of threads, distribution of tasks to the threads are abstracted and most often not visible to the programmer.
There are some switches and levers you can "play around" in order to make LV to behave differently in this matter. But this most often requires deep LV knowledge and cannot be explained in a simple posting.....
hope this helps,
Norbert
Amen to that!
The question can not be fully answered without digging into the internals of the OS LV is run on because LV works with the OS and lets it do the scheduling.
Yes that note applies to pre- LV 7 RT. When run under RT the ONE Time Critical loop was guarenteed to stay determinisitic.
Since then the Timed Loop was introduced that allowed multiple levels of priority and later allowed us to assign which CPU the code would run on.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
memory requirement is continiously increased when i am running my application program in an infinite loop,after certain time it shows an error called low virtual memory
What are you doing with your program. Lots of improper programming techniques can cause this - building arrays, concantanating strings, opening but not closing refrences, etc. Need more details or post your VI. Also, have you looked at "LabVIEW Performance and Memory Management"? It's part of the shipping documentation and available from Help>Search the LabVIEW Bookshelf.
-
Execution time for Call Library Function Node
I am experimenting with the Call Library Function Node block in LabVIEW and am curious if it should be running faster than what I'm seeing. For testing purposes, I have compiled and transfered to my RT target the .out file from the KB article http://digital.ni.com/public.nsf/allkb/81D1172E3C28A5E4862575CC0076A230 (I'm using the vxworks 6.1 version). The function in the .out file just multiplies two inputs together, adds a constant, and returns the result. I have put this inside a 1 kHz timed loop with a commanded period of 1 ms and via the Ticks(ms) block and shift registers I calculate the amount of time per loop execution. This process is apparently taking 5 ms per cycle and to me that seems slow. Is that roughly the correct execution time for this kind of setup? I will attach my test .vi file.
What I'm using:
Windows 7
LabVIEW 2009 SP1
NI-cRIO 9024 with NI-RIO 3.4.0
Solved!
Go to Solution.
Attachments:
test DLL.vi 31 KBFirst off, the way you are doing timing isn't necessarily accurate because you don't know when the tick count VI is being called. For example, if it gets called on one iteration after your call library node executes, and the next iteration it gets called before the CLFN it executes, the subtraction doesn't include the call of the CLFN so you aren't seeing the true time it is taking for the dll to be called.
Where it says "error" on the top left hand corner of your loop. left click and choose previous iteration timing. Also, do you have the ability to choose a 1 Mhz clock? Are you sure it's actually being run on the RT and not on your PC? Running it on the PC would definitely make it difficult to execute at a 1 kHz rate.
CLA, LabVIEW Versions 2010-2013
Maybe you are looking for
-
Special Characters in Report Name or Report Description(URGENT)
Hi All, I am using Hyperion Financial Reporting System 9 tool. Could anyone tell me what problem we face if we use special characters in report name and report description? Waiting for quick response. Regards, SN
-
I am using Windows 8 and Firefox 19.0.1....I do not have the awesome bar at the top of the screen....Are there any suggestions for restoring this feature?
-
External Drive - Best Format?
Please help me recall what each kind of format's pros and cons are. I know that the Mac OS Extended formats cannot be read by PCs. My drive needs to be able to be read by PCs. I recall that one of the other formats (Fat32?) cannot use large files. Wh
-
Firefox Hangs Downloading and Displaying PDF Files
I've had a problem with Firefox for several years where it hangs in the middle of the file when downloading and displaying a PDF file. Typically it downloads a few hundred kilobytes and then stalls. Recently I upgraded from Acrobat 8.1 to Acrobat 9.
-
Anyone know what this is? sandboxd: ([36729]) WebProcess
(36729) deny file-write-create /Library/Caches/com.nvidia.OpenGL/F5C45580-0C5E-372B-946A-7F44E25BC8A0/9F5FDF13 5F0BC012/33180C74-B962-3ACC-A049-647FC9902413.toc