Gigasource

Results 17 comments of Gigasource

Text component from react-native-web can convert lineHeight to px, i think tamagui should do that too .

how long do you need for the feature ?

Hi , i try to create 10000 nodes on browser and it takes 600 ms , i think it is too slow . Yoga wasm takes only 43ms for same...

yes , i use this pr, i try Taffy::with_capacity too, but the result is the same.

```js const allocator = new Allocator(11000); const container = new Node(allocator, { position: Position.Absolute, width: 500, height: 500, justifyContent: AlignContent.FlexStart, // gapWidth: 50 }); container.setStyle({flexDirection: FlexDirection.Row}) console.time('create1') const arr =...

```rust #[wasm_bindgen] impl Allocator { #[wasm_bindgen(constructor)] pub fn new(size: usize) -> Self { Self { taffy: Rc::new(RefCell::new(taffy::Taffy::with_capacity(size))) } } } ```

i try to create 10000 nodes from rust side but it has the same result .

```javascript import {Node, Allocator, Position, AlignContent, Layout, FlexDirection} from '@/shared/taffy/taffy_layout'; ``` and i need to setup vite: ```js const wasm = require("vite-plugin-wasm").default; \\... plugins: [ wasm() ] ```

for compile i use wasm-pack build --release in your bindings/wasm and i copy the compiled folder to @/shared/taffy