tabs size calculation performance improvement