It depends on the access patterns. If you traverse the dynamic array
from start to end or end to start, then dynamic array access will
generally be faster (depends a little on the data the array contains).
Use the group search to find lots of posts on this subject in the dim
and distant past.
> I should note that the number of attributes in this dynamic array is
> currently around 50, and will be rising, as we are being called upon
> to perform ever more-complicated decisions using additional data
> points.
>
This isn't really a large enough array to worry about unless a lot of
the individual elements are large and/or you are using random access
patterns and cannot change that. It will almost certainly take longer to
do the MATPARSE/MATBUILD (as using jprof would show you).
> Or, if there is no real benefit to be gained using MATPARSE/MATBUILD,
> is there an optimal method for extracting the needed data from the
> Dynamic Array?
>
Use the data elements in order and not in a random access pattern. If
they are being accessed a lot in random order then first copy them into
temporaries and use those (but be aware that as you add more local
variables to subroutines, the creation and destruction of them on
subroutine enter and exit will start to be expensive; use COMMON
variables to avoid that overhead).
However also note that 1 million transactions per day, while it sounds
like a lot is essentially nothing for a modern computer... that said,
you have an HP system ;-) Unless what you are doing is very complicated,
you should be able to process a million transactions in a few minutes. I
suggest that you will get a lot more performance improvements by using
jprof on your application code than you will by second guessing the
access patterns like this. Concentrate on why time is spent in certain
subroutines or on certain lines of code, file sizes and so on.
Jim
About mv.NET, another way you may be able to optimize your
requests is by spreading the data out in the call to the server.
In other words:
Method 1, what you're probably doing:
- Build an mvItem of 50 attributes.
- Create string from mvItem as request.
- Instantiate result var.
- youraccount.CallProg("PROG",ref request, ref result)
- that calls SUBROUTINE PROG(REQUEST,RESULT)
Method 2
- Build several strings
- youracct.CallProg("PROG",ref s1, ref s2, ref s3...)
Your subroutine will accept multiple dynamic arrays, sort of
pre-parsed for you:
SUBROUTINE PROG(S1,S2,S3,S4,S5,S6,S7)
You can pass up to about 20 arguments but that can be expanded if
required.
HTH
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D is a worldwide distributor for mv.NET and
other Pick/MultiValue products, and provides related
support and development services