[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Status Banner



Yes, I'm aware Netscape calls it "recursion" but I don't think it is, based
on my stack tests.  If setTimeout is true recursion Nav 2.0 would bug out
afer the 500-odd loops, just as it does with a *real* recursive loop.  I
don't see the stack behaving one way with one kind of recursive loop and not
another.  There's only one kind of recursive loop, and my stand (still is)
that setTimeout is not recursive.  I just think they used the term a little
too broadly, and in this case has caused some confusion.  (I have a Windows
programming background and this kind of timer hook is used all the time --
that OS *lives* on timers! -- and is never considered recursive.)

I have also gotten the disk activity stuff, though I haven't gone to 42,000
loops!  At least we know it can be done, and that a marquee can be properly
written to avoid crashing in just a few minutes time.

-- Gordon
http://gmccomb.com/javascript/

At 09:01 PM 2/29/96 +0000, you wrote:
>
>> I tested my banner (which is at
>> http://gmccomb.com/javascript/banner_start.html) and it did some 3,000
>> iterations without a peep, so I know it's possible to construct these
>> without corrupting the stack or running out of memory.
>> 
>> -- Gordon
>> >
>> >Mine is also somewhat the same. I turn the msg string into a loop. I 
>> >agree. Passing arguments (poor Mr. Stack), and  if this...then 
>> >that...else something else  sounds like band aid code to me. 
>> 
>
>I agree.  Mine uses endless recursion since there is no other choice. 
>BTW Netscape calls the use of setTimeout() in this manner recursion 
>although it does seem to act differently than just calling a function 
>within a function.
> 
>My only point was if there are alternatives to passing arguments that 
>yield the same results then why not use them. BTW I tested mine through 
>48,000 levels without an incident and I found out something 
>interesting in the process. After about 42,000 levels I started 
>hearing far more disk activity than normal. I have a feeling Netscape 
>caches this stuff to disk after a while. Not a bad idea, really. 
>However, there is no way to expect that all Netscape versions for all 
>platforms will act the same. While much of the code may be re-usable, 
>much is not. I wish Netscape would release some docs on the 
>internals. Not how it works but instead what it expects.
>
>My new banner routine will be in use soon. It recurses to the level 
>of message_string.length,  does a return, and then starts over again. 
>The recursive function that calls it will add just one additional level for 
>each iteration of the message string (16 byte integer?) That should 
>be safe on all platforms unless you send War and Peace to it.
>
>John
>--------------------------------------------------------------------
>For help about the list, please send a message to 'majordomo@obscure.org'
>with the message body 'help'. To unsubscribe, send a message to
>'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
>List archives and pointer to FAQ: http://www.obscure.org/javascript/
>
>
-- Gordon
http://gmccomb.com/javascript/


--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/