variable size limit with GetRecordsAsPropList?
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Sep 11 08:50:14 CDT 2003
on 9/11/03 1:56 AM, Rob Wingate at rwingate at visual-book.com wrote:
Hi Rob,
> Valentina is great. I saw your recent posts on Direct-L, and am excited for
> version 2's release.
Thank you.
> I'm using GetRecordsAsPropList() to format a very large recordset into a
> Lingo property list, like this:
>
> on GetRecordSetAsPropList( me, strSql, strCaller )
> hRs = new( xtra "VCursor", hDb.GetRef(), strSql )
> bError = me.CheckDbError( strCaller )
> if bError then
> ls = []
> else
> ls = GetRecordsAsPropList( hRs )
> hRs = 0
> end if
>
> return ls
> end
>
> Question: is there a size limit on how large this proplist variable ('ls')
> can be?
I think only RAM can be limit.
> When GetRecordsAsPropList returns a large number of results,
> Director MX completely bogs down on this line:
>
> ls = GetRecordsAsPropList( hRs )
> At that moment (and afterward), Director becomes extremely slow, such that
> each line of lingo takes about 25 seconds to execute. Do you know what could
> be happening here?
Rob, this is because Property List in the director is VERY SLOW thing.
I think you have see that Valentina resolve query VERY fast.
It is NOT recommended to use GetRecordsAsPropList() for big number of
records. Only for few records.
I recommend you extract result values using simply Cursor API of V4MD.
This will be much faster. This will NOT eat additional RAM as list.
I do not remember if GetRecordsAsPropList() allow build as list only some
records of cursor, if yes you can use also this way.
As for me I prefer Cursor API.
May be little more code needed but works better.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list