-
Notifications
You must be signed in to change notification settings - Fork 475
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
toArrayBuffer (and download) slow due to use of concat function #512
Comments
7 tasks
Added pull request. Interestingly, while this change should improve performance across the board, use of |
Closing as pull request was merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saving font files using
toArrayBuffer
(and functions that invoke it) takes much longer than necessary (several seconds per font on some browser/OS combinations) due use of theconcat
function to append elements to an array. For example, I ranwindow.font.download()
in the console of the https://opentype.js.org/ site (on Firefox + Windows 10) and 86% of the runtime was due to theconcat
function. This should be resolved easily by usingpush
instead--I will write a pull request in the next few days.The text was updated successfully, but these errors were encountered: