GithubHelp home page GithubHelp logo

Performance issues about graphics-smooth HOT 13 CLOSED

pixijs avatar pixijs commented on May 4, 2024
Performance issues

from graphics-smooth.

Comments (13)

dev7355608 avatar dev7355608 commented on May 4, 2024 3

@ivanpopelyshev Is this (da1c536) ok?

from graphics-smooth.

dev7355608 avatar dev7355608 commented on May 4, 2024 2

@9a-aaaaaaaa Make sure you don't unnecessarily redraw the graphics when you just want to change the position of it. I couldn't observe anything abnormal like that unless the graphics was redrawn with a new instance of the dash line shader.

I released the fix.

from graphics-smooth.

ivanpopelyshev avatar ivanpopelyshev commented on May 4, 2024 1

we can remove it

from graphics-smooth.

Amoki avatar Amoki commented on May 4, 2024

Can it be related to pixijs/pixijs#7583 ?

from graphics-smooth.

ivanpopelyshev avatar ivanpopelyshev commented on May 4, 2024

You re-create graphics often, right? hmmm... It looks like shader caching doesnte work properly

from graphics-smooth.

dev7355608 avatar dev7355608 commented on May 4, 2024

Probably because a new program is created for each dash line shader:

super(settings, new SmoothGraphicsProgram(settings, undefined, dashFrag),

We should add SmoothGraphicsProgram#fromSettings(settings, vert, frag), which constructs the sources and then calls Program.from(vert, frag).

from graphics-smooth.

ivanpopelyshev avatar ivanpopelyshev commented on May 4, 2024

oh, yes, it was experimental and i didnt cache it. @dev7355608 agree

from graphics-smooth.

dev7355608 avatar dev7355608 commented on May 4, 2024

@ivanpopelyshev SmoothGraphicsProgram#from doesn't return the program as an object of class SmoothGraphicsProgram. That is annoying. Is an extract subclass of Program really necessary or can we remove it?

from graphics-smooth.

9a-aaaaaaaa avatar 9a-aaaaaaaa commented on May 4, 2024

You re-create graphics often, right? hmmm... It looks like shader caching doesnte work properly

Like Figma, I encountered this problem when I moved the graphics. I didn't create the graphics multiple times while moving, just changing positions.

from graphics-smooth.

9a-aaaaaaaa avatar 9a-aaaaaaaa commented on May 4, 2024

Can it be related to pixijs/pixijs#7583 ?

I'm not sure, I was just creating the graphics using graphics-smooth and I ran into this problem when I moved the graphics around. I think it's the same kind of problem.

from graphics-smooth.

9a-aaaaaaaa avatar 9a-aaaaaaaa commented on May 4, 2024

we can remove it

Will there be any other effects of removal? If removing it makes this performance better, look forward to it. many thanks.

from graphics-smooth.

ivanpopelyshev avatar ivanpopelyshev commented on May 4, 2024

@dev7355608 looks ok

from graphics-smooth.

9a-aaaaaaaa avatar 9a-aaaaaaaa commented on May 4, 2024

@9a-aaaaaaaa Make sure you don't unnecessarily redraw the graphics when you just want to change the position of it. I couldn't observe anything abnormal like that unless the graphics was redrawn with a new instance of the dash line shader.

I released the fix.
Wow, thank you very much. It's amazing.

from graphics-smooth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.