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

V2 is slower at rendering simple text #4514

Closed
JSteunou opened this issue Nov 28, 2017 · 5 comments · Fixed by #4519
Closed

V2 is slower at rendering simple text #4514

JSteunou opened this issue Nov 28, 2017 · 5 comments · Fixed by #4519
Labels

Comments

@JSteunou
Copy link
Contributor

v1 has a bypass for empty styles that v2 has not causing lines is twice longer to render. When using fabric use a log of text shapes this is a 100% perf hit compared to v1.

Temporary solution: using cache on those shapes (which improve perf a lot but add a little blur when scaling up and down)

Backport solution: porting the v1 check and logic into v2 like

      if (this.isEmptyStyles()) {
        return this._renderCharsFast(method, ctx, line, left, top);
      }
@asturur
Copy link
Member

asturur commented Nov 28, 2017

Re inserting the fix should not be a problem.
In my own case since i had to override renderChars for my own app, i need to think to a fix to my own override to continue working

@asturur
Copy link
Member

asturur commented Nov 28, 2017

When scaling the blurriness comes from noScaleCache, that you can disable.

@JSteunou
Copy link
Contributor Author

Already disabled :(

But it's still better than v1!

@asturur
Copy link
Member

asturur commented Nov 28, 2017

that is strange. i would not expect the text to be blurred after a scale.
Can you post the JSON object of one of your groups?

like canvas.getActiveObject().toObject() so that i can try it

@JSteunou
Copy link
Contributor Author

I cannot reproduce the tiny blur effect with simple fabric usage so I withdraw my remark, it's on my side :(

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

Successfully merging a pull request may close this issue.

2 participants