improve TextStream object creation performance