Why is Snap soooooo laggy?

Snap is like 2 or 3 times as laggy as Scratch.

What do you mean by that? In what way do you mean "laggy"?

depending on what you're doing, it's laggy.

The reason why it's laggy is because it doesn't use native js and webgl, which scratch does. It uses morphic.js which is a reimplementation of squeak(?) in js.

Please don't quote me on this, I'm not qualified to explain how snap works.

why doesn't it use native JS?

Q U O T E

ok, let me say what I really meant to say.

Snap is made entirely with js (I'm sorry about saying it doesn't).

idk why snap is laggy, just, forget everything I said before. I don't know what I'm doing.

Can you give an example project that is laggy? Some common practices in Scratch are very slow in Snap!

It doesn't use native Canvas. Morphic is a window-widget manager/UI system. The original Morphic was written by John Maloney for use in implementing Self. John then rewrote it in Smalltalk for use in Squeak and in Scratch (both, not coincidentally, Smalltalk-based projects led by wholly or partly by John). BYOB, as an extension of Scratch, used Morphic ipso facto. When what was to be renamed Snap! was rewritten in JS, Jens spent the first 2/3 of the time rewriting Morphic, with me biting my fingernails about whether he'd ever get around to rewriting BYOB, but he assured me that that would take relatively no time once he had Morphic working, and he turned out to be right. :~)

I'm sure it's true that Snap!'s graphics are slow compared to native Canvas graphics, but bear in mind that until 3.0 Scratch was using Morphic too. (Now they're using Blockly.) Jens argues that some of what Snap! does simply can't be done in Canvas, especially Snap!'s liveliness (an idea of Dan Ingalls'), i.e., in Snap! terms, the ability to edit your scripts while they're running, and have the edit take effect instantly.

More than you wanted to know, probably.

Doesn't Scratch have

too?

are you using presentation mode? that makes it lag.

In one of my projects, using presentation actually makes it run faster... probably due to the lack of visible scripts.

yeah, scratch does have that, but it does slow down scratch a bit.

Yes, Scratch is lively; that's one of many things we took from their design. I'm not sure how they implement it using Blockly, maybe Jens knows?

Scroll to the bottom.
You will the text

Snap: A Scratch-inspired graphical programming language, it's not a library but is instead a full app with an integrated execution environment.

.
You didn't implement Blockly, did you?

Haha no! Neil Fraser was the chief developer at Google. It's nice that they acknowledge us that way!

Oh, I was so lazy I didn't even read the text

Even with all those positives, Blockly isn't the solution for every app. Here are a few other visual editors that you might find helpful:

.

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