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

Caching of the Image object in FImage's form drawImage (native) #191

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@rshest

rshest commented Mar 10, 2015

The drawing of the "FImage" form (used by e.g. the currently undocumented Graphics.Collage.sprite) currently creates the Image object every time the form is drawn (which effectively loads the image again), making it practically unusable.

A proposal here is to cache the image object as a property of the corresponding form object, first time it is attempted to be drawn.

Another possibility would be to create and cache it earlier, at the stage of the form object creation.

In my opinion, even better long term alternative would be to include something like jcollard's sprite library (https://github.com/jcollard/elm-util) as part of the core (one caveat there being that it's relying on an element for drawing, as opposed to the "sprite" one that does direct canvas drawing, without DOM intervention).

@0joshuaolson1

This comment has been minimized.

Show comment
Hide comment
@0joshuaolson1

0joshuaolson1 Feb 1, 2016

@silverio Is there a more relevant PR elsewhere?

0joshuaolson1 commented Feb 1, 2016

@silverio Is there a more relevant PR elsewhere?

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 11, 2016

Member

Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.

Member

evancz commented May 11, 2016

Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.

@evancz evancz closed this May 11, 2016

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