bit of memory optimization in portrait class