correct, slow stream compaction