Closed GoogleCodeExporter closed 2 years ago
Hi Max. I think this limit really make sense and several times I found myself
wanting the same. but I don't understand what you mean with "When the
serialization reaches the limit it will discard the stack of untraced objects
and replace invalid references with nil." Could you explain a bit more?
Because it looks complicated for normal graphs. Remember this will be for any
type of graph, not necessary context stacks.
Wouldn't make sense to throw an error if we reach the limit?
Original comment by marianopeck
on 31 May 2013 at 11:55
I guess it depends on the use case. In my case I want to have a serialized
version of the stack and I don't want any exception to be thrown. What I'm
asking is "serialize as much as you can but not more than x objects, then
terminate".
If I understand you correctly, you're case would be along the lines "serialize
the graph only if it does not contain more than x objects. If you reach the
limit, notify me by throwing an exception".
So maybe we need two things here:
1. a mechanism to limit the number of objects serialized
2. a mechanism to tell fuel how to behave when that limit is reached
How about this:
FLAnalyzer newDefault
objectLimit: 50000;
dontFailOnLimit;
yourself.
Default would be to signal an exception when the limit is reached.
Original comment by maxle...@gmail.com
on 31 May 2013 at 4:19
I have an idea of how to do this but it requires changes to various parts of the code. I have a simple prototype which still fails for more complex cases.
Theory: think of the graph as a network of nodes that are grouped around the root node in concentric circles. Every circle represents a one step increase of distance to the root node. To constrain the number of objects in the graph sensibly, simply prune nodes with distance > x. This even works for context chains.
Do the changes to various parts of the code of your working prototype also increase complexity to understand the code, or are they just spread changes? If it's more close to the first option, then you can just commit it, IMO.
Yes, I believe they do. I'm not happy with the code. First I want to have a prototype that works across all cases, then I can try to make it pretty.
This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.
@theseion In 4.0.0 (finally ;))
Original issue reported on code.google.com by
maxle...@gmail.com
on 31 May 2013 at 8:50