GithubHelp home page GithubHelp logo

Comments (4)

lucdion avatar lucdion commented on May 12, 2024

Hi @flagello, and thanks for the nice comment! πŸ‘

Thanks for pointing me to this yoga's comment. You're right that it would probably reduce the overhead. But I think that before optimizing something (often, its time consuming and it adds complexity to codes) you must be sure what is the real gain in code execution time. So before optimizing you must measure it. In that case, a function call will always be very efficient and compare to the computation required to layout a view and to update the screen, it will be negligible.

Also, using FlexLayout, most code is executed while initializing views, so the cost of calling multiple times objc_msgSend() its done only once.

I will add this to my TODO list and check it when I have the time.

If you have any other concerns or ideas, they are always welcomed.

from flexlayout.

 avatar commented on May 12, 2024

I do agree β€” and although it’s indeed a one-time operation I’d be curious to see some tests. Should I decide to use FlexLayout I’ll be sure to test it out myself as it is an interesting optimization case.

from flexlayout.

lucdion avatar lucdion commented on May 12, 2024

You'right. Did you have the time to checks FlexLayout/Yoga performance in this benchmark: https://github.com/layoutBox/LayoutFrameworkBenchmark

from flexlayout.

lucdion avatar lucdion commented on May 12, 2024

Hi @flagello, I've thought about your comment, and it comes it was pretty easy to fix it, simply by keeping a reference to the yoga's interface. See #42

from flexlayout.

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.