3 ms·
I wonder if you could just pass this 10000 tree node root to another thread that will just drop it. This should result in no pause for main thread. Apparently
by scotty79 5y ago
I wonder if you could just pass this 10000 tree node root to another thread that will just drop it.
This should result in no pause for main thread.
Apparently you need Arc for that not Rc which shouldn't have much overhead over Rc in reasonable scenarios.
- mplanchard 5y agoYes, doing big drops in a subthread is a good way of avoiding pauses when dropping large objects of any kind.
- native_samples 5y agoWhich is, of course, largely what concurrent GC is about.
- pjmlp 5y agoYes, that is how C++/WinRT handles cascading deletion of COM instances, however when you are going down that route, it is basically a poor man's tracing GC.
- edude03 5y agoThere is a thread I came across on hacker news that does exactly that https://news.ycombinator.com/item?id=23362518 https://news.ycombinator.com/item?id=23362518 - this question reminded me of it