Open mcollina opened 11 years ago
a global dom would be ideal since they are so large and slow to create, just recycling the node to hold the calculation i think should work fine, maybe i'm missing something?
You are right that creating a DOM is slow, but then you have to clean it up correctly, as you are appending a new svg for each stream, and not cleaning up the DOM when it closes. Moreover, you are always using the same id, which is bad (not sure how JSDOM will behave on that). The svg needs to be cleaned up after the source stream closes.
I always hate globals, so I'm biased here.
I agree. To fix this, perhaps the answer is just to remove the node? That way the same id can be used and a only a single dom needs to be created.
Just removing the node after is ok, this is a sync function.
Il giorno lunedì 22 luglio 2013, Paolo Fragomeni ha scritto:
I agree. To fix this, perhaps the answer is just to remove the node? That way the same id can be used and a only a single dom needs to be created.
— Reply to this email directly or view it on GitHubhttps://github.com/Wayla/bezier-stream/issues/1#issuecomment-21375383 .
Should not be wrapped inside a single dom? D3 as defaults operates on a "global" DOM. Could not create problems for this kind of visualization?