dovigod / V-Gesture

Other
2 stars 0 forks source link

[Optimization] - prevent layout trashing #8

Closed dovigod closed 4 months ago

dovigod commented 4 months ago

Start Date

2024/05/15

Implementation PR

9

Reference Issues

No response

Summary

Article

On initialization phase, it will try to read all gClickable nodes, and bind its absolute position to itself by executing getBoundingClientRect

Since this api invokes synchronous reflow, it cause poor initialize speed (synchronouse reflow * g-clickable elements).

After researching, I found FastDom which is mainly implemented for preventing unnecessary reflows by batching calculation.

Basic Example

N/A

Drawbacks

N/A

Unresolved questions

No response