....
processData (bv as view,..........)
....
private sub processData(bv as view,....)
.....
bv.add(somepanel,......)
end sub
AND
B4X:
....
somepanel = processData (some params..........)
bv.add ( somepanel, .......)
....
private sub processData(some params....) as somepanel
.....
return somepanel
end sub
my queries are
1. which of these codes will be faster (assuming that processdata is called a lot of times during CLV loading)
2. will having many parameters passed through call reduce performance or it will be barely noticeable ?
While I appreciate what you want to convey here, this is stemming from the fact that when I'm passing whole lot parameters to reduce duplication of code it is actually slowing down CLV loading a lot
No it doesn't. You can pass million views and it will be extremely fast.
1. Make sure to test performance in release mode.
2. If something is slow, it is unrelated to the views passed. When you pass a view, you are not making a copy of any object. It is a simple pointer that is passed.
You are over thinking things. Premature optimisation is the enemy of good code. Just write the code it in a straightforward and understandable way and see if it is good enough.
You are over thinking things. Premature optimisation is the enemy of good code. Just write the code it in a straightforward and understandable way and see if it is good enough.
While I appreciate what you want to convey here, this is stemming from the fact that when I'm passing whole lot parameters to reduce duplication of code it is actually slowing down CLV loading a lot - If I don't I am getting into unwanted initialization issues. Hence seeking advice before I waste more time restructuring code.
While I appreciate what you want to convey here, this is stemming from the fact that when I'm passing whole lot parameters to reduce duplication of code it is actually slowing down CLV loading a lot
No it doesn't. You can pass million views and it will be extremely fast.
1. Make sure to test performance in release mode.
2. If something is slow, it is unrelated to the views passed. When you pass a view, you are not making a copy of any object. It is a simple pointer that is passed.
No it doesn't. You can pass million views and it will be extremely fast.
1. Make sure to test performance in release mode.
2. If something is slow, it is unrelated to the views passed. When you pass a view, you are not making a copy of any object. It is a simple pointer that is passed.