On 2/17/13 3:16 AM, smaug wrote:
Curious, how does GC manage nodes? Do we explicitly trace even those nodes which don't have js wrappers or do we just use GC for everything in Rust?
All the nodes in Servo have JS wrappers at the moment, and their lifetimes are managed by the JS garbage collector. The JS garbage collector traces all nodes. The Rust garbage collector isn't really involved as far as DOM nodes are concerned.
How do we keep GC times fast enough? Will generational GC optimize out those nodes which aren't used lately?
We don't have to run destructors on the main thread in Servo, so IGC should in theory be able to perform better. Also we won't have to visit all nodes except during a major collection with generational GC. But we'll have to see how it performs in practice, of course.
It's possible to move to some sort of different scheme in the future. The DOM implementation is pretty simple at the moment.
Patrick _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo