Bloomca / veles

UI library with main focus on performance
https://bloomca.github.io/veles/
MIT License
47 stars 0 forks source link

Idea: support promise as a return type in components #8

Open Bloomca opened 4 months ago

Bloomca commented 4 months ago

One problem with busy interfaces is that sometimes it takes too much time to render everything, there is simply too much code, and 100ms render time is not possible even on fast machines.

One potential idea to solve it is to "cascade" or "delay" rendering, usually by some sort component wrapper which introduces a delay before rendering a component. By adding native support for promises, we'll be able to:

The first point is pretty useless, as creating a wrapper is usually pretty simple. The second point is much more interesting. Potentially we can provide a wrapper/property which will say that the tree from that point needs to be executed in batches, and that would be it for the developers.

This is an interesting idea to explore, but first I need to release the library and make a very complicated UI to actually measure the potential impact and to see how it looks.