Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morphic: deprecate non-silent set* Functions? #2173

Closed
cycomachead opened this issue Aug 7, 2018 · 4 comments
Closed

Morphic: deprecate non-silent set* Functions? #2173

cycomachead opened this issue Aug 7, 2018 · 4 comments

Comments

@cycomachead
Copy link
Collaborator

OK, maybe I'm misunderstanding things, but it seems like there's a lot of easy optimizations to do because morphic makes it easy to redraw way too often.

My understanding:
We have setPosition, Width, Height, Extent and so one. These all have silent variants which update the properties by do not do any new drawing of an object.

In Snap! it's super common to use multiple set* functions over a bunch of different calls, but this leads to a bunch of intermediate draws which are basically not seen to the user.

It seems like the ideal situation is to just do everything silently and then have the caller use one drawNew call at the end of all the updates. Far more often that not, it seems like when doing layout there's get a lot of the setX functions, and very seldom do you only use one and want to redraw.

I don't know, did I just propose something super heretical to the Squeak-ers?

The other option is to some how have set* functions be aware of their caller and then delay drawing until the very end, but this seems complex and maybe error prone.

@brianharvey
Copy link
Collaborator

Isn't the standard thing to have each object have a dirty bit that's set by the Set functions, and then, when it's time to refresh the display, redraw all the dirty objects at once?

@cycomachead
Copy link
Collaborator Author

cycomachead commented Aug 7, 2018 via email

@brianharvey
Copy link
Collaborator

Yes, I'm all for that! The goal is to make loading libraries so blindingly fast that Jens will finally agree to automatic loading of the tools library when a new project is created.

@cycomachead
Copy link
Collaborator Author

Obsoleted with morphic2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants