Comments (4)
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.
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.
You'right. Did you have the time to checks FlexLayout/Yoga performance in this benchmark: https://github.com/layoutBox/LayoutFrameworkBenchmark
from flexlayout.
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)
- why not update yoga and yogakit? HOT 2
- Why is the subview constraint incorrect? HOT 1
- Nice work! HOT 1
- UILabel will get out of superview's bounds when text is too long HOT 2
- error: 'YGEnums.h' file not found HOT 3
- 'grow' not take up rest of space of cotainer. HOT 3
- 'YGEnums.h' file not found Error HOT 4
- Pods/FlexLayout/Sources/yoga/Yoga-internal.h:9:10: 'algorithm' file not found HOT 5
- how to use inline-flex feature HOT 1
- Are there plans to support macos? HOT 1
- FlexLayout package does not build with SwiftPM HOT 1
- 'YGEnums.h' file not found - When adding FlexLayout as dependency of another Swift Package. HOT 8
- ABI stability swift evolution support for different swift versions
- Use of bitwise '|' with boolean operands HOT 4
- Swift Error causing debugger not working
- Crash occurs when a `.wrapReverse` flexbox container has a `.display(.none)` item.
- Flexbox gap of Yoga in FlexLayout? HOT 2
- Child already has a owner, it must be removed first. HOT 6
- Override UITableViewCell
- The same code get different results in versions 1.3.33 and 2.0.07.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexlayout.