[ALL] Second project... Optimizations

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jul 15 13:23:34 CDT 2006


On 7/15/06 1:18 PM, "Stan Busk" <maxprog at mac.com> wrote:

>> 1) You see destructor Cursor_Destructor for first cursor is called
>> AFTER
>> construction of second?
>> 
>> This is danger, because you can catch record locks.
>> I think you have loop as:
>> 
>>     dim curs as Vcursor
>> 
>>     loop
>>         curs = db.SqlSelect( .. )
>> 
>>     end
>> 
>> 
>> The best code is:
>> 
>>     dim curs as Vcursor
>> 
>>     loop
>>         curs = db.SqlSelect( .. )
>> 
>>         curs = nil
>>     end
> 
> 
> I don't use such loops. To calculate group unread articles at
> startup, there is a loop but that loop calls a function that does the
> calculation and returns it to the calling function. I guess the
> cursor is automatically set to nil by RB as soon as you exit the
> function, right? 

Hmm, yes it should...well, try set it to Nil explicitly at end of
function...

MAY BE you make 2 cursors inside of this single function ?

I am sure that in some function or in some loop you assign new cursor into
curs variable that already contains cursor.

> When calculating thread unread articles, I do it
> with Threads. Valentina collapses completely. It worked great and
> fast with v1, now I get the beach ball most of the time because it is
> extremely slow.

I think you have not read my ..SOLVED ... Letter.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list