Is the internal methods behind REMOVE the same as EXTRACT (or <>).

Again, about a year ago, I had an issue with an attributed xref rec of the
invoices for a customer that had grown to almost 150,000 invoices.

The original programmer used <> with a counter and it took very long to
'age' that cust on an inquiry screen. (don't solve my A/R problems).

This was on a D3 box. So I utilized the REMOVE command and it went from
around 3 minutes to around 15 seconds.

BTW. To use REMOVE on D3, you need the OPTION $EXT command earlier.

I'm gonna try your LEN vs #"" to see if that makes sense. As an experienced
programmer though, I would have to see if it really matters on regular small
values instead of these monster values. I've used #"" a zillion times.

Thanks
Mark johnson
----- Original Message -----
From: "Stevenson, Charles" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Friday, March 09, 2007 1:48 AM
Subject: RE: [U2] old dog, new tricks


> To add to Adrian's explanation, when a string is in memory, the first
> few bytes at that string's address is not actual data, but metadata
> about the string, including its length, so UV immediately knows where
> the string ends (& where the next string begins).
> Therefore <-1> can make an immediate jump, rather than searching through
> the string counting attributes.
>
> This also implies that something like
>     IF LEN( X ) THEN
> is faster than something like
>     IF (X # '') THEN
> .
>
> You can also see why <n,-1> & <n,m,-1> aren't particularly fast, since
> they aren't at the end of the srting.
>
> UV keeps similar metadata up front about the last attribute accessed, &
> the remove pointer.  That is what makes both REMOVE/REVREMOVE and
> EXTRACTs of sequential <n>s so fast.
>
> cds
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to