More clone lag - why?

I have had a lot of lag problems with clones in the past. This project only has about 28-30 clones at any given time, but the longer the page is run the more unresponsive and laggy it becomes. Why over time is the cache or something filling up so the page continually gets slower? The number of clones isn't growing.

What's problem you are encountering?
Lots of lags but only about 28-30 clones

What have you tried that didn't work?
Lots of different versions of this same code. So far this is the most efficient version I have come up with.

Post a project example, link, or screenshot:

Btw it works in Edge - a Chrome/Snap! issue only?

thats your problem.

With every guess, you create two new clones for every letter. After 5 tries, there are 40-70 clones.

  1. All clones have a "forever" loop
  2. Half of those loops, constantly, 60 times per second, switch to the same costume. It can stress the graphic subsystem of the browser

Snap! is extremely busy doing unnecessary things.

I suggest to:
Remove unnecessary cloning.
Do you know that clones, once created, are receiving broadcasts?
Just store the valid guess for the clone as a sprite variable.
Then every clone can react to "update text" and just switch to the appropriate costume.
Also to destroy clones the "forever" loop is not necessary.
DC 10-07-06 - Text Rendering script pic (1)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.