Embedding Transparent png onto image very slow...thoughts?

I have a function that embeds a transparent png onto an image on upload. On the local testing server and a hosting server, we are using php 5.2.17 and GD 2.0.34 with very good results (2-3 seconds per 1.5MB image). On servers running a php version higher than 5.2.17 and GD version 2.1.0, we are experiencing extremely long process/upload times (4-6 minutes per 1.5MB image). On some hosts, the function won’t even complete, it just hangs forever. Any thoughts on this would be extremely helpful as I’m out of ideas at this time. Is anyone aware of any bugs in the newer PHP or GD libraries that could cause this? Below is the code to look at.

Thanks for looking!!!

function add_watermark( $source_file_path, $output_file_path, $watermark_file_path, $quality = 80 ) {
    list( $source_width, $source_height, $source_type ) = getimagesize( $source_file_path );

    if ( $source_type === NULL ) {
        return false;
    }

    switch ( $source_type ) {
        case IMAGETYPE_GIF:
            $source_gd_image = imagecreatefromgif( $source_file_path );
            break;
        case IMAGETYPE_JPEG:
            $source_gd_image = imagecreatefromjpeg( $source_file_path );
            break;
        case IMAGETYPE_PNG:
            $source_gd_image = imagecreatefrompng( $source_file_path );
            break;
        default:
            return false;
    }

    $overlay_gd_image = imagecreatefrompng( $watermark_file_path );
    $overlay_width = imagesx( $overlay_gd_image );
    $overlay_height = imagesy( $overlay_gd_image );

    imagecopy(
        $source_gd_image,
        $overlay_gd_image,
        $source_width - $overlay_width - 10,
        $source_height - $overlay_height - 10,
        0,
        0,
        $overlay_width,
        $overlay_height
    );

    imagejpeg( $source_gd_image, $output_file_path, $quality );
    imagedestroy( $source_gd_image );
    imagedestroy( $overlay_gd_image );
}

Here are the PHP settings used on all servers:

memory_limit = 100M
upload_max_filesize = 192M
post_max_size = 100M
file_uploads = On
allow_url_fopen = On