Fre is 10 times faster than react!

Recently, some people used react to find that rendering a large amount of data is particularly slow. They began to try fre and found that fre is 10 times faster on average than react!

Fre has been very fast. Frankly, I know react very well. I think …


This content originally appeared on DEV Community and was authored by Yisar

Recently, some people used react to find that rendering a large amount of data is particularly slow. They began to try fre and found that fre is 10 times faster on average than react!

Alt Text

Fre has been very fast. Frankly, I know react very well. I think the structure and algorithm used by the react team are not good enough within the framework, and they have not improved.

Let's look at the flame diagram.

react:

Alt Text

fre:

Alt Text

In this test, react defaults to synchronous mode and fre to concurrent mode, but in theory, the synchronous mode should be faster.

The time slice unit of fre is 16ms, which can finally be close to 60 FPS. There is an error in react. They think that the smaller the unit, the better, so that the unit of 5ms is too small and JS pressure is too high.

According to my experience, the advantage of vdom framework is that it has a better structure and can make better algorithms. Not only diff algorithms, but also offscreen algorithms.

But fre's algorithm is not the best. Maybe I will implement a better algorithm in fre3.

https://github.com/yisar/fre

If you are interested, you can see it.

Now I mainly do miniapps in the company. The rendering of miniapp uses fre.

Because this is a mobile architecture, I don't have much time to realize the fetures of PC side such as SSR, which is a pity.


This content originally appeared on DEV Community and was authored by Yisar


Print Share Comment Cite Upload Translate Updates
APA

Yisar | Sciencx (2021-08-07T02:11:59+00:00) Fre is 10 times faster than react!. Retrieved from https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/

MLA
" » Fre is 10 times faster than react!." Yisar | Sciencx - Saturday August 7, 2021, https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/
HARVARD
Yisar | Sciencx Saturday August 7, 2021 » Fre is 10 times faster than react!., viewed ,<https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/>
VANCOUVER
Yisar | Sciencx - » Fre is 10 times faster than react!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/
CHICAGO
" » Fre is 10 times faster than react!." Yisar | Sciencx - Accessed . https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/
IEEE
" » Fre is 10 times faster than react!." Yisar | Sciencx [Online]. Available: https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/. [Accessed: ]
rf:citation
» Fre is 10 times faster than react! | Yisar | Sciencx | https://www.scien.cx/2021/08/07/fre-is-10-times-faster-than-react/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.