streetstrider / fluh Goto Github PK
View Code? Open in Web Editor NEWsimple & easy functional reactive library with atomic push strategy
License: Other
simple & easy functional reactive library with atomic push strategy
License: Other
Using eval
violates strict CSP policy. However, it can bring huge perf benefits at the same time. I wonder, is it possible to use CSP and allow usage of eval, say, for current domain only.
My tests show that using eval
technique for compose
function provides almost the same perf as by writing function composition by hand. (web) eval-compose is slower by 5%, while reduce-compose is slower x3 times.
If it would be possible to apply to the graph computation as an optimization on per-graph basis (similar to current graph cache, but inline a lot more) it can yield big perf gain. Keep in mind that it would cause a bigger memory footprint and still worth to measure how much memory would be taken in that case.
Hello! Thank you for making an awesome library.
I see that there are some recent updates, and it's more active that flyd. I'm thinking of trying this out for a experimental production project, would you recommend me against that?
State management libraries usually feature something like createStore
method. The purpose of it is to create state root for the current state management instance. This approach is correct, but I dislike it for additional level of instancing. But the alternative is worse: you need to make your module stateful by creating a single state instance inside of the imported module. It is not a big deal. Some packages have their own global state, (like fastdom and flyd itself), but it's not a perfect architecture (however, the real issues are small).
Right now fluh is stateful module. It has global Realm object designated for state. This approach does not break anything, since you can store multiple graphs in one realm, however there are small downsides. For instance, current cache system would invalidate all caches on every graph if one of the graphs changes.
I wonder, is there a way to solve all statefulness issues without introducing explicit «createStore»?
Solution might be to make graphs self-organize. Each graph should create single realm object and connect all Buds to it. In case of extension all newly created Buds (all of them are descendants) would be also connected to the same realm. In case of graph split, which essentially happens when partial ending graph, realm should also split.
Right now Buds have both direct and reverse references for finalization and memory cleaning purposes, so Buds in one graph can reach each other freely. It would not be a problem even to designate leader Bud if it would be required by new design.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.