performance tweak with early check in is_transparent