Comments (4)
Fixed in 281f7b0 (based on 17.0.0-M1, so to be used with Laminar v16). I will release that as M3, and port it to M2 and release that as M4.
That commit makes transactions stack safe, both in breadth and in deep nesting.
I'm also planning to add a customizable transaction depth limit to detect that kind of accidental infinite loop: raquo/Laminar#116 (otherwise that kind of bug in your code would pin the cpu and freeze the entire client app).
from airstream.
In my opinions, if we can somehow traverse the graph in truly depth first order (siblings do not create new function calls, only children do), itβd be the best.
I'm not sure if I understand what exactly you mean, but if you mean the internal mechanics of Transaction - how Transaction.run
is called recursively even in case of sibling (not nested) transactions β then this is already fixed in that commit I linked. That recursion is now tail call optimized, @tailrec
ensures that this recursion is rewritten into a while
loop that does not blow the stack when it compiles to JS. I've added two tests, one with 20K sibling transactions, another with 20K nested transactions, that should catch any stack overflow regressions in this code.
from airstream.
Thank you for your quick replies on discord.
In my opinions, if we can somehow traverse the graph in truly depth first order (siblings do not create new function calls, only children do), itβd be the best. Because I do think that creating a transaction tree that go too deep is more of a bug than a coding logic, and stack overflowing in that case is a very necessary indicator.
from airstream.
Fixed in Airstream 17.0.0-M3 (binary compatible with Laminar 16) and 17.0.0-M6. See Discord #news channel for details of the releases.
from airstream.
Related Issues (20)
- .split operator is hard to use without Laminar
- Killing subscriptions from observers (?)
- splitByType / splitByEnum HOT 6
- Can `DerivedVar` support `map/update` semantics in addition to `map/contramap` semantics? HOT 2
- Add an AjaxStream upload progress observer
- FetchStream does not emit events if it's initialized outside of a transaction HOT 1
- [Question] Simulate DomEventStream click on page load HOT 5
- idiomatic usage of foreach for EventStream HOT 4
- RFC: Should we import-gate flatMap? HOT 7
- Streams should emit in a shared transaction when starting HOT 2
- Vars should be splittable HOT 2
- Error: code length overflow HOT 2
- split doesn't memoize on Signal[LazyList[A]] HOT 1
- Zooming into a Var should not require an Owner? HOT 4
- SplitChildSignal does not re-sync when restarted HOT 5
- `composeEither`: fixed-scope `flatten` without transcations HOT 4
- Add method variant of EvenStream.merge? HOT 5
- Update and get HOT 5
- add flatmap to ReactiveEventProp HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airstream.