Conversation
|
Excellent 💃 |
| for(i = optsOut.text.length; i < count; i++) { | ||
| optsOut.text[i] = ''; | ||
| } | ||
| } |
There was a problem hiding this comment.
Nice catch @alexcjohnson !
Because this file conflicts with my texttemplate branch, I will have to modify it anyway. How should I solve this problem? Can I simply slice it or is this a no go for performance?
There was a problem hiding this comment.
I'd say slice is fine - as long as you only do it when text.length < count. I think it's totally reasonable to say "for best performance make sure your arrays are all the same length" and prioritize stability over edge-case performance. The presumably higher-perf alternative would be to track down where the array is being indexed and fall back to a blank string at that point... but looks like that's deep in a regl submodule so that sounds painful 😅
There was a problem hiding this comment.
Probably not a big deal. But since we're planning on releasing 1.49.3 and this PR got merged, @antoinerg can you make another PR off master to fix and test the optsOut.text mutation?

Closes #4124