![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm looking for some way to improve performance of data extraction from large dynamic arrays - specifically in Advanced Pick. The mechanics of what I'm working with are already deeply ingrained in the application software and I'm not going to re-invent the wheel, but the sitch is that reports get written to a single record in one big/fat attribute mark delimited array, then each line (attribute) has to be extracted and parsed and handled for a variety of reasons. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. in Universe i'd just use the 'REMOVE' statement and it would fly. i've tried advanced picks flavor of remove - i think the syntax is like 'remove element at position from array setting delimiter.code' but i just don't seem to get much if any performance boost using that method. any clues for how to turbo charge this kind of extraction? |
#3
| |||
| |||
|
|
I'm looking for some way to improve performance of data extraction from large dynamic arrays - specifically in Advanced Pick. The mechanics of what I'm working with are already deeply ingrained in the application software and I'm not going to re-invent the wheel, but the sitch is that reports get written to a single record in one big/fat attribute mark delimited array, then each line (attribute) has to be extracted and parsed and handled for a variety of reasons. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. in Universe i'd just use the 'REMOVE' statement and it would fly. i've tried advanced picks flavor of remove - i think the syntax is like 'remove element at position from array setting delimiter.code' but i just don't seem to get much if any performance boost using that method. any clues for how to turbo charge this kind of extraction? |
#4
| |||
| |||
|
|
iJah wrote: I'm looking for some way to improve performance of data extraction from large dynamic arrays - specifically in Advanced Pick. The mechanics of what I'm working with are already deeply ingrained in the application software and I'm not going to re-invent the wheel, but the sitch is that reports get written to a single record in one big/fat attribute mark delimited array, then each line (attribute) has to be extracted and parsed and handled for a variety of reasons. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. in Universe i'd just use the 'REMOVE' statement and it would fly. i've tried advanced picks flavor of remove - i think the syntax is like 'remove element at position from array setting delimiter.code' but i just don't seem to get much if any performance boost using that method. any clues for how to turbo charge this kind of extraction? Write the dynamic array to a workfile, then MATREAD it back in (as a dimensioned array.) There might be a more direct way to do this in BASIC, like MATPARSE or similar? (Been a long time since I've used A/P.) -- frosty |
#5
| |||
| |||
|
|
I'm looking for some way to improve performance of data extraction from large dynamic arrays - specifically in Advanced Pick. The mechanics of what I'm working with are already deeply ingrained in the application software and I'm not going to re-invent the wheel, but the sitch is that reports get written to a single record in one big/fat attribute mark delimited array, then each line (attribute) has to be extracted and parsed and handled for a variety of reasons. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. in Universe i'd just use the 'REMOVE' statement and it would fly. i've tried advanced picks flavor of remove - i think the syntax is like 'remove element at position from array setting delimiter.code' but i just don't seem to get much if any performance boost using that method. any clues for how to turbo charge this kind of extraction? |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
I'm looking for some way to improve performance of data extraction from large dynamic arrays - specifically in Advanced Pick. The mechanics of what I'm working with are already deeply ingrained in the application software and I'm not going to re-invent the wheel, but the sitch is that reports get written to a single record in one big/fat attribute mark delimited array, then each line (attribute) has to be extracted and parsed and handled for a variety of reasons. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. in Universe i'd just use the 'REMOVE' statement and it would fly. i've tried advanced picks flavor of remove - i think the syntax is like 'remove element at position from array setting delimiter.code' but i just don't seem to get much if any performance boost using that method. any clues for how to turbo charge this kind of extraction? |
#8
| |||
| |||
|
|
Frosty's idea might be your easiest solution. If the report record only contains attribute marks, or each attribute has the exact same structure and number of values and sub-values with in each value, then you could write the record to disk and the perform a qselect of the item from disk. The just use a readnext statement the get each delimited piece of data. I find that not to many people realize the easy, power, and speed of doing qselects. |
#9
| |||
| |||
|
|
If you've already got the array in memory, can't you simply SELECT the array, then do a LOOP WHILE READNEXT thing? SELECT REC LOOP WHILE READNEXT LINE DO whatever... REPEAT The syntax may be different for your platform, but you get the idea... |
#10
| |||
| |||
|
|
iJah wrote large dynamic arrays - in Advanced Pick. This is being done all over with the usual N=DCOUNT(REC,CHAR(254) FOR I=1 TO N LINE = REC<I NEXT I obviously the deeper you get into the array the slower the crawl. any clues? If you've already got the array in memory, can't you simply SELECT the array, then do a LOOP WHILE READNEXT thing? SELECT REC LOOP WHILE READNEXT LINE DO whatever... REPEAT The syntax may be different for your platform, but you get the idea... Regards, Joe * Close, but AP READNEXT wants an ELSE clause. |
![]() |
| Thread Tools | |
| Display Modes | |
| |