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

Application Wide Image Cache #2

Open
jhenkens opened this issue Aug 16, 2014 · 0 comments
Open

Application Wide Image Cache #2

jhenkens opened this issue Aug 16, 2014 · 0 comments

Comments

@jhenkens
Copy link
Contributor

When loading a file, images take too long.

We could speed this up by making a application wide image cache - any time you want to to Image.new, you first check to see if an image with that URL (well, let's use a hash of that url or data/uri tag, so the data struct is smaller) already exists in this global dictionary. If not, we create a new one and put it there. if it does exist, just get it from the dictionary (and maybe copy its data if html canvas's dont like rendering the exact same object multiple places).

We can also look at integrating this into the project opening process.

http://stackoverflow.com/questions/10240110/how-do-you-cache-an-image-in-javascript

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

No branches or pull requests

1 participant