Sy-index inside a loop
Hi All,
I am trying to enhance a datasource and in that I am writing a loop inside another loop. I am trying to get
the loop number of the inner loop by using the sy-index inside the inner loop. But, the sy-index is not being changed and it is always remaining as 1.
I even checked the sy-index in the outer loop and it is the same even there. I do not have any idea why the sy-index is not changing according to the loop number.
Any Ideas????
Best Regards,
Nene.
Nene,
I suggest to use your OWN counters ( when using may loops) like
l_****_out = l_****_out + 1.
and
l_****_in = l_****_in + 1.
Regards,
Hari
Similar Messages
-
How to avoid data selection inside the loop?
Hello Experts,
I am working on one performance item and I have already applied some changes to the original version.
Now, If I compare my new program with old program, I have good improvement in performance. I am checking if I can do anything on statements that are top on the below list. I think 40% for Modify statement is acceptable after my research (Below run is updating around 20M records which is real time volume for this application).
As we can see 34% of run time to going for one SELECT query on custom table. Take a look at below high level flow of my program to understand above select query.
1. Select data from ZABC
2. Select data from Variant Table (Var1, Var2, Var3 etc.., 12 in real time)
3. Loop Variant Table
4. Select data from X, Y, Z table for Var<n>.
5. Populate final internal table from ZABC, X, Y and Z table
6. Modify ZTABLE with Final Internal table data
7. End Loop on Variant Table
As described in the flow of the program, ZABC table data is common for all the variants and need not to fetch multiple times. Hence I am doing it only once in my program. Below is that select query:
select rrcty ryear rbukrs racct rcntr sum( amt1) as amt1 "Like I have 32 amount fields in original query
from zabc
into table i_zabc
where ryear in r_year " Two records in ranges with I and EQ
and rvers = '001'
and rrcty in r_rrcty "Three records in ranges with I and EQ
and rldnr = 'DT'
group by rrcty ryear rbukrs racct rcntr
order by rrcty ryear rbukrs racct rcntr.
ZABC table is again having huge volume of data and we are fetching millions of records with above query. That is primary reason to take long time. May be that is okay as I am already using Indexes of this table. But, I am not comfortable with it as it can reach max. memory point and through run time error. Fetch Cursor is one reliable option that I can see here, but with that, I should move ZABC selection inside the variant loop which can cause fetching ZABC data 12 times (Let me know If I am missing anything here).
Now, third statement in my trace results, with 10% of overall time is this:
loop at i_abc assigning <fs_abc>.
loop at i_table assigning <fs_table> where low <= <fs_abc>-racct and high >= <fs_abc>-racct.
endloop.
endloop.
6 million executions with this complex WHERE condition is causing this statement to get 3rd position in trace results. I tried below two options which are, I think, taking even more time - (I am still monitoring these options)
1) Removed WHERE condition on LOW, HIGH and applied filter inside the loop.
2) Removed WHERE condition on HIGH only and applied filter inside the loop.
Any suggestions on how to proceed with ZABC selection and I_TABLE loop.
Let me know if you have any questions on above compose.Since I looked at this case before, let me try some quick suggestions:
Is table ZABC related to table X, Y and/or Z and can the selection be limited by applying those 12 selection variants?
If yes, try a join select involving these tables that could make your step 1 obsolete and replace steps 4 and 5.
This might also get rid of the "loop inside loop" problem. Generally, make sure that the inner table is declared as a sorted table with a key that consists of the fields as used in the WHERE-condition of the inner loop. Use secondary keys for internal tables if your ABAP release permits and the task at hand warrants it.
Finally, look at PACKAGE SIZE option for the (join) select to reduce memory consumption.
Thomas -
How to build an array inside a loop
Hi everyone,
I have a basic question about labview. I would like to create an array in a "for" loop in that way:
inside the loop, if a condition named "A" is verified, then, i add a new value to the first column of the array. Otherwise, i create a new column, and start to add values to this column when the condition "A" is verified, etc.
I put an example of a VI where the condition "A" is "the increment of the loop + 1 is not divisible by 5" and the values of the arrays are the increment of the loop + 1. The loop stops when the increment = 25.
In this example, i have a single column with the values [1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24]
while I would like to have an array of 5 columns:
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
Note than this is just an example. More generally, the array can contain columns of different lengths.
Thanx for your answer
Andrew
Solved!
Go to Solution.
Attachments:
build_array.vi 9 KBYou can't have columns in an array have different lengths - you can dynamically increase the size of the array (e.g. build array) but it means you will get the default value of the array in the other columns up to the new size of the array (normally 0).
You will need to either keep track of the last index you wrote to for each column so you can trim it later or put an array in a cluster and then create an array of those (an array of a cluster of an array) - that will allow your column data array to have different lengths and you'll just need to unbundle/bundle the array before adding new items.
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets -
Hi.
I think this is a pretty basic LV question, but I have not been able to find a good solution.
I am attaching VIs that show the problem I am having, but obviously, the real application is a lot complicated, which forces me to try to do it this way.
The issue is: I have a subVI with a Boolean control inside a loop. When the control is true I want some action to take place. When the subVI is run on its own, it works fine, acting properly when I set the boolean control to true via the LV FPGA interface from the host. However, when I use it as a subVI, in which the top-level VI calls several instances of the subVI, I have the Boolean controls in the top level VI. What is happening is that the false Boolean value with which the top-level VI starts is passed into the subVIs, and not updated, even though the control is inside the loop.
Can any one suggest a good solution?
Thanks,
AlejandroZ
Attachments:
CallingVI.vi 7 KB
subVI.vi 8 KBHi.
I know the example I posted might seem silly, but it was just to illustrate the problem I am having. In reality this is the application:
I have some LV FPGA code which uses a few FPGA IO to implement a serial link to communicate with a device. Most of the time we are getting data from the device, so the serial link is used to send a read command, read in the data and put it into a FIFO. However, I also wanted the VI to support sending data to the device, so I added an array control to put the data you want to send, and a boolean control to tell it you want to send it.
Since sending and receiving data are done using the same FPGA IO, they cannot be independent operations, because they would garble each other. Therefore, in the subVI I have a loop in which I first read data if there is any to read, then check the boolean write control to see if there is data to write.
As I mentioned, this works perfectly for talking to a single device. However, we run into the issue of this topic when trying to replicate this for several devices.
One easy solution is to not have the loop in the subVI, and have it in the calling VI (I am favoring this simple solution right now). The only reason why I have not done this yet, is that the subVI has more than one loop, so I am going to have to create several subVIs. I just posted to see if there was an even simpler solution...
There have been some other possibly good solutions proposed here, though I am not sure if they work in LV FPGA.
Thanks for all your responses.
AlejandroZ -
How do we use if statement in labview?moreover can i use if statement inside for loop?
how do we use if statement in labview?moreover can i use if statement inside for loop?
The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
Attachments:
For_Loop_with_Case.jpg 21 KB -
Standard function module inside a loop.
Hi Experts,
I am trying to improve performance program that has a standard abap function module inside a loop. I am some what lost on what to do here. Here below is what the code looks like as of now. I have read that i need to try and not use the function module at all be it is a very complicated function module. Any suggestions will be appreciated.
DATA: tl_retorno TYPE bapireturn1 OCCURS 0 WITH HEADER LINE. "Retorno
DATA: wl_bukrs LIKE acct_det_bf-comp_code, "Empresa
wl_process LIKE acct_det_bf-process, "Chave
wl_symko LIKE hrpp_acct_det-symb_acct, "Conta Simbólica
wl_momag LIKE hrpp_acct_det-eg_acct_det, "Agrupamento
wl_razao LIKE acct_det_bf-gl_account. "Conta Razão
*--> <--*
SORT tg_rubcr BY bukrs lgart.
LOOP AT tg_rubcr.
CLEAR: wl_bukrs, wl_process, wl_symko, wl_momag, wl_razao.
wl_bukrs = tg_rubcr-bukrs.
wl_process = tg_rubcr-process.
wl_symko = tg_rubcr-symko.
CLEAR tg_aux.
IF tg_rubcr-u_momag IS INITIAL. "A rubrica necessita de agrupamento?
CLEAR wl_momag.
* Busca Contas Razão sem Agrupamento de Empregados
CALL FUNCTION 'HRPP_FI_ACCT_DET_HR'
EXPORTING
companycode = wl_bukrs
process = wl_process
symb_acct = wl_symko
eg_acct_det = wl_momag
add_modif = ' '
IMPORTING
gl_account_debit = wl_razao
* GL_ACCOUNT_CREDIT =
* POSTING_KEY_DEBIT =
* POSTING_KEY_CREDIT =
* ACCOUNT_TYPE =
TABLES
return_tab = tl_retorno.
tg_rubcr-razao = wl_razao.
tg_aux = tg_rubcr.
APPEND tg_aux.
ELSE. "Não necessita de agrupamento de empregado?
LOOP AT tg_t52em. "Para todos os agrupamentos
CLEAR tg_aux.
CLEAR tl_retorno.
REFRESH tl_retorno.
CLEAR wl_momag.
wl_momag = tg_t52em-momag.
* Busca Contas Razão com Agrupamento de Empregados
CALL FUNCTION 'HRPP_FI_ACCT_DET_HR'
EXPORTING
companycode = wl_bukrs
process = wl_process
symb_acct = wl_symko
eg_acct_det = wl_momag
add_modif = ' '
IMPORTING
gl_account_debit = wl_razao
* GL_ACCOUNT_CREDIT =
* POSTING_KEY_DEBIT =
* POSTING_KEY_CREDIT =
* ACCOUNT_TYPE =
TABLES
return_tab = tl_retorno.
tg_rubcr-razao = wl_razao.
tg_aux = tg_rubcr.
tg_aux-momag = tg_t52em-momag.
APPEND tg_aux.
ENDLOOP.
ENDIF.
ENDLOOP.
* Limpa tabela com rubricas e move todo o conteúdo da auxiliar
REFRESH tg_rubcr.
CLEAR tg_rubcr.
tg_rubcr[] = tg_aux[].
ENDFORM. " busca_conta_razaoHi Patrick,
If you do not want to use the function module then the other option that you can use is do selects from the tables that the FM 'HRPP_FI_ACCT_DET_HR' is using to get the importing "parameter gl_account_debit = wl_razao" outside the loop.
So steps will be:
Debug FM 'HRPP_FI_ACCT_DET_HR' to find out how it getting importing data using exporting parameters.
Then before the loop is called do a select for all entries on table tg_rubcr. And id muliple tables are used Read statements to populate a final table with gl_account_debit = wl_razao value.
Then use the final table to get this value inside the loop.
Please let me know if you need more details. -
Smart form - loop inside a loop
Dear Techies,
I am new to smartforms. I have a query, in one of the code examples there is a context menu on the main window called "complex selection", but i dont find the same in my editor, what is the reason.
I want this because i have data in two internal tables. Different tables are generated from secondary depending on the entries in first table. how do i achieve this on the main window.
Similar to loop inside a loop, depending on my first table entries, all the entries belonging to that entry are to be put in table of second entry. i will have tables equal to the entries in first internal table. hope my question is clear.
Please help.
Regards
imran.Hye..
Loop in main area will fill only the current table, but i want several tables depending on entries in the first internal table. The number of tables in the main window will be the number records in the first table.
Regards
imran. -
How to get the column index inside a dataTable
Hello,
before I get staked, there are multiple threads handling familiar topics to the one I'm questioning about but none gives an anwer. If there is one, I'm propably to less skilled to see it.
So here is my Problem: I've build a web-interface to a time-recording system. The hours worked on a certain project are displayed in a dataTable component which is generated out of a mySQL Query. Each entry (column/row) contains a inputText component to display and edit the specific value.
Editing one of these inputText elements now fires a valueChangeEvent which reads the new value and stores it in the database. For that cause I need to know the row- and column-index of the inputText component that fired the event.
Using the getClientId method from the valueChangeEvent I get some Information which makes it possible to calculate the row/column index. A typical clientID looks like "form_table:mainTable:0:_id14". "form_table" is the ID of the form the dataTable is in. "mainTable" is the id of the dataTable component. "0" is the row the component is in. And finally "_id14" stands for the id randomly given to the inputText component by JSF.
My Problem is now, that though I can calculate the column out of the[i] "_id14", this calculation is hardcoded. So everytime I add a component in before the dataTable, the calculation needs to be adjusted in the code.
The Questions:
- How to force a sensefull id indicating a column-index for the inputText components inside the columns of a dataTable?
- Nicer since no workaround: How to get the column-index inside the dataTable on a natural way? (e.g. out of the valueChangeEvent the specific inputText component fires)
After some investigation here on the board and on the net I know multiple ways to get the row index, (Things like component-binding and so on) but I can't find a answer on how to get the column-index.
Thanks to all answers and/or links to things my eyes missed while searching for one....then index 0 becomes index 1 and my program doesn't work properlyThe program works properly, just not as you expect it to.
As you've noticed the table gives you the flexibility to move columns around. So if you move column 0 to column 1, why would you expect to still use 0 as the index? The table manages the reordering of columns for you to make sure the data being displayed in each table column comes from the correct column in the data model.
You can manage this yourself using one of the following methods (I forget which one):
table.convertColumnIndexToModel(int viewColumnIndex)
table.convertColumnIndexToView(int modelColumnIndex)
Or, you can get data from the data model directly:
table.getModel().getValueAt(row, 0); -
How to use select a vi function inside a loop?
I am modifying the notifier basics part 2.vi to send a notifier to each of 64 sub-vi's. How can you use the 'select a vi' function inside a loop for 64 iterations to access the individual filenames??
Attachments:
Notifier_BASICS_Part_2.vi 87 KBIf all you are trying to do is send notifiers to each of these 64 subVIs, I would suggest not doing it in a loop, but rather just placing the 64 subVIs in your diagram.
The alternative is of course to use the call by reference node and have an array of VI names. This is a little cleaner on the diagram, but 1) doesn't occur in parallel and 2) is a bit tricky. Additionally, you have to be sure that your array of filenames is correct, and that you NEVER move or rename those VIs. Of course, you could always put them in a directory and create an array by reading the directory contents.
Either way, good luck, it doesn't sound like fun. -
Performance issue: CALL FUNCTION inside a Loop.
Hi Friends
I have a Performance Issue. That is, inside a loop...endloop a CALL FUNCTION has been used which gets data from another database table. Finally it's appended into another internal table. Please see this :
LOOP AT i_mdkp.
REFRESH lt_mdtbx.
CLEAR lt_mdtbx.
CALL FUNCTION 'READ_MRP_LIST'
EXPORTING
idtnum = i_mdkp-dtnum
icflag = 'X'
tables
mdtbx = lt_mdtbx
APPEND LINES OF lt_mdtbx TO i_mdtb.
ENDLOOP.
It happens for each record available in i_mdkp. Suppose, i_mdkp have around 50000 records, it needs to call the function module till that much time.
So, I want to split it. Can I?
Please give me your valueable suggestions.
Regards
SenthilIf internal table i_mdkp has 50,000 records it does not mean that you need to run 50,000 iterations. You just need dtnum from internal table i_mdkp so you number of iterations should be eqaul to the unique number of dtnum in the internal table. Sort the internal table by dtnum and delete adjacent duplicates from the internal table comparing dtnum before looping. Look at the code below.
DATA i_mdkp_tmp LIKE TABLE OF i_mdkp.
IF NOT i_mdkp[] IS INITIAL.
i_mdkp_tmp[] = i_mdkp[].
SORT i_mdkp BY dtnum.
DELETE ADJACENT DUPLICATES FROM i_mdkp COMPARING dtnum.
REFRESH i_mdtb.
LOOP AT i_mdkp.
CALL FUNCTION 'READ_MRP_LIST'
EXPORTING
idtnum = i_mdkp-dtnum
icflag = 'X'
TABLES
mdtbx = lt_mdtbx.
APPEND LINES OF lt_mdtbx TO i_mdtb.
REFRESH lt_mdtbx.
ENDLOOP.
i_mdkp[] = i_mdkp_tmp[]
ENDIF. -
How to avoid the loop inside the loop? as it reduces the performance.
hi masters,
i have 2 internal tables having 1 same field. eg table itab having f1, f2, f3 fields and itab1 having f1, f4 and f5 fields. let us consider the data in the itab and itab1 is like below given
itab-f1 itab-f2 itab-f3 itab1-f1 itab1-f4 itab1-f5
10 aa 11 10 abc 456
10 bb 15 10 def 655
10 ff 13 10 ghi 456
11 dd 16 10 tre 455
11 zz 24 11 ftr 256
11 ii 54 11 kjh 556
12 hh 24 12 fjk 751
now i want the result in final table like below
f1 f2 f3 f4 f5
10 aa 11 abc 456
10 aa 11 def 655
10 aa 11 ghi 456
10 aa 11 tre 455
10 bb 15 abc 456
10 bb 15 def 655
10 bb 15 ghi 456
10 bb 15 tre 455
10 ff 13 abc 456
10 ff 13 def 655
10 ff 13 ghi 456
10 ff 13 tre 455
11 dd 16 ftr 256
11 dd 16 kjh 556
11 zz 24 ftr 256
11 zz 24 kjh 556
11 ii 54 ftr 256
11 ii 54 kjh 556
12 hh 24 fjk 751
i can get this result using the
Loop at itab.
loop at itab1 where f1 = itab-f1.
process....
endloop.
endloop.
but it is very slow. i want to avoid this loop inside the loop and i want to implement the same program using read table.. like below..
Loop at itab.
Read table itab1 with key ....
process...
endloop.
Is it possible? to get multiple records from itab2 using read statement or with READ statement that using CASE Statement or IF statemetnt.
Plz help me...hi,
please try the following code
TYPES:
begin of ty_itab2,
f1
f2
f3
f4
f5
end of ty_itab2.
DATA:
lw_tab2tmp type ty_itab2,
lt_tab2tmp type standard table of ty_itab2.
sort it_itab by f1.
loop at it_itab into lw_itab.
at new f1.
CLEAR lt_tab2tmp[].
loop at it_itab1 into lw_itab1 where f1 = lw_itab-f1.
CLEAR lw_tab2tmp.
move-corresponding lw_itab1 to lw_tab2tmp.
append lw_tab2tmp into lt_tab2tmp.
end loop.
"while there is no data with f1 in it_itab1
if lt_tab2tmp is initial.
lw_tab2tmp-f1 = lw_itab-f1.
append lw_tab2tmp into lt_tab2tmp.
endif.
end at.
CLEAR lw_tab2tmp.
MOVE-CORRESPONDING lw_itab to lw_tab2tmp.
modify lt_tab2tmp from lw_tab2tmp TRANSPORTING f2 f3 where not f1 is initial.
append lines of lt_tab2tmp into lt_itab2.
end loop.
lt_itab2 is the final table.
There may be some syntactically errors.
I have not a system to test it now, please test it. -
Best practice: Using break statement inside for loop
Hi All,
Using break statment inside FOR loop is a best practice or not?
I have given some sample code:
1. With break statement
2. With some boolean variable that decide whether to come out of the loop or not.
for(int i = 0; i < 10; i++){
if(i == 5){
break;
boolean breakForLoop = false;
for(int i = 0; i < 10 && !breakForLoop; i++){
if(i == 5){
breakForLoop = true;
The example may be a stupid one. But i want to know which one is good?
Thanks and Regards,
Ashok kumar B.Actually, it's bad practice to use break anywhere other than in conjunction with a switch statement.Presumably, if you favour:
boolean test = true;
while (test)
test = foo && bar;
if (test)
}overfor (;;)
if (! ( foo && bar) ) break;
}then you also favour
boolean test = foo && bar;
if (test)
}overif (foo && bar)
}Or can you justify your statement with any example which doesn't cause more complexity, more variables in scope, and multiple assignments and tests? -
Cannot call "mask and limit testing" inside a loop
Calling "mask and limit testing" in a loop doesn't work. The problem
is that the Upper Limit and Lower Limit are initialized only the first
time the VI is called. All waveforms are tested against the same
limits even if different limits are passed at each iteration. Is there
a way to use this VI in a loop?
Thanks!
Martin
Attachments:
test_limits_testing.vi 193 KBDear Martin,
Thank you for contacting National Instruments. I would like to apologize for the delay in responding to your support request.
From the information you have provided, it sounds like you are running your VI and experiences issues with the lower and upper mask refreshing after subsequent iterations of the FOR loop.
The �Mask and Limit Testing� Express VI is not intended to function inside a loop; however, you can fortunately modify this Express VI to perform the desired action. To do so, please follow these instructions:
1) Open the Block Diagram for your �test_limits_testing.vi� file
2) [Right Click] on the �Mask and Limits Testing.vi� Express VI
a. Select [Open Front Panel]
b. When prompted to convert to a standart subVI, choose [Convert]
3)
[Right Click] on the �subMaskLimitTesting.vi� Express VI
a. Select [Open Front Panel]
4) From the toolbar, select [Window] >> [Show Block Diagram]
5) You should see two subVI�s named �MatchDT� (white icons with black text)
a. Wire a [True] Constant to the �Reset 2� input terminal for each of the �MatchDT� subVI�s
i. To do this, right click each input terminal and select [Create]>>[Constant]
ii. Make sure the constant value is set to [T] for �true�
6) Save and Close the subVI�s
7) Re-run your �test_limits_testing.vi� file, and the masking limits should re-initialize upon each loop iteration
You have successfully customized the VI to function within a loop.
I hope this helps! Please don�t hesitate to let me know if there�s anything else I can help with or clarify. Have a great day!
Kind Regards,
Joe Des Rosier
National Instruments -
Last value from a loop and values inside the loop
Hi
Sorry about the confusing heading above, but its late at night and better words do not occur to me rightaway. Let me explain my situation.
I have a single instrument (a voltage source) that is being swept from one value to another for an experiment. It has three VI's : 1. enable o/p. 2. Set a voltage output level. 3. diable o/p.
I am using the error in and error out pins of instrument vis to properly sequence operations. I connect the error out pin of VI 1 to the error in pin of VI 2. Each of these errors is a cluster of three values.
When I try to wire the error out from VI 2 inside the loop to VI 3 outside the loop, the wiring breaks as I am then trying to connect an array (a 1 dimensional n member array of error outs) to a single error in pin. Trying to connect it to an array outside the loop is obviously the same. (I am making an assumption here - while the loop is running, I do not need to make certain of the sequencing of operations by putting a feedback node on VI 2 - that would mean something quite different in any case.).
So, how do I pass the last value (in this case, the error out cluster from the last stage) to error in pin of VI 3 ?
I have read that it might be possible using shift registers. I am quite new to LabVIEW. A somewhat detailed description of what I need to do would be nice.
Thanks.Hello,
There are basically two options:
Handle the errors outside the for-loop
Handle the errors inside the for-loop
For you solution 1 is the easiest achievable, after the for loop use the 'Merge Errors' VI this will change the 1d-array into a cluster. The downside is that if an error occured later states of the loops don't know this
Solution 2 uses the shift register you mentioned. To use this you have to right-click on the right hand-side tunnel of the error wire (where it leaves the for-loop) and select shift register, sequentially your mouse pointer changes into an downpointed arrow, click on the entry tunnel on the left of the for-loop. What happens is that an error in the for loop is remembered into the next iteration (use execution highlighting to watch these)
Here is some code:
A good start might be:
The link to the LabVIEW Learning Center is here
Ton
Message Edited by TonP on 09-25-2006 08:01 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Attachments:
Example_BD.png 5 KB -
Difference between initialising variables inside a loop and outside it.
What is the difference between initialising a variable, say a String, inside a loop and outside it?
Are there performance differences, memory allocation issues etc? Or is there no difference at all?
For example:
1. Outside the loop
String s = "";
while (foo)
s = some variable;
2. Inside the loop
while(foo)
String s = some variable;.Hence, it definitely improves the performance of your code.That only depends on the code. Modern VM like Hotspot are very good at optimizing things.
for the in the loop thing.
Its true you need to create a new Object but memory doesnt need to be reallocated always because the VM knows the previiously declared Object has become available (it went out of scope)
Generaly: dont use the outside loop because you think it might help performance: always leave micro-optimizations for the VM.
It might be faster but its not a certantiy
Maybe you are looking for
-
How do you minimize a file size in a PDF?
Help! I just need to minimize a file in a pdf- how?
-
Adobe Acrobat, protecting Images in a Fillable form?
I am a graphic designer and am using Adobe Acrobat X pro to create fillable invitations, labels and such what I want is that my client cannot print the file without filling "required" field..... Also , no one can edit it even if they open via acrobat
-
For some strange reason, my navigation buttons in Safari and Finder, as well as other OS x UI screens have vanished. The button placeholders are there, but the graphics are not. This is also only happening in one logon account. I assume a preferrenc
-
create table test (num NUMBER); insert into test values(1); insert into test values(9); savepoint a; insert into test values(7); update test set num=100 where num=9; savepoint b; delete from test where num=1; commit; delete from test where num=1;I am
-
Option to encrypt time machine network disks not available
I have two MBP' (Os10.8.4) machines that backup over a network to a MM running 10.6.8 retail. In TM the box to encrypt the backup is grayed out. I read in Pondini' excellent instructions ( http://pondini.org/TM/31.html ) that it is only available in