๐ณ UI trees in Godot are pretty speedy, once the text cache is built. 10k items is like nothing, it scrolls smoothly!
Alas, filtering can be laggy. Hiding a TreeItem is cheap, but making it visible is not. At 10k items, if you set them all visible in a single frame, you'll see the tree hang up for a moment.
Solution? Make items visible in batches! Start by hiding everything immediately, then show, say, 1k items in a frame. Repeat until exhaustion. Replace that hang with responsive UI!