-
Notifications
You must be signed in to change notification settings - Fork 138
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
Crashes with every file larger than aproximately around 200 KB #16
Comments
I'm not certain if this is the same issue, but on Chrome / Angular, the performance drops off severely for even moderately sized images. I believe I've traced the issue to the doResizing function:
executing that particular regular expression on the dataURL.match line takes a great deal of resource - on a 32Gb iMac, it was taking minutes at a time to process a ~1Mb file, and could easlly appear as if it had crashed. I had to ignore injunctions to kill the page 3 or 4 times but it does complete eventually. Fortunately the fix is easy, using the DataURI spec. as a reference, just replace the match with a simple substring:
This has reduced the processing time to < 1 sec. for everything I've tried it on so far. |
can you do a PR? |
Hi, unless I've made a mess of it, I should already have added one, PR#25 I think? Unfamiliar with the process so apologies if I've got things out of sequence. |
Using angular 1.2.0 I ran into the issue that chrome and also firefox tend to crash for every file a little larger than a few Kilobytes. Any idea how to circumvent that?
The text was updated successfully, but these errors were encountered: