This is the function I use to return the filesize of a remote image.
PHP Code: 
function ffilesize($file){
    
$ch curl_init($file);
    
curl_setopt($chCURLOPT_NOBODYtrue);
    
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    
curl_setopt($chCURLOPT_HEADERtrue);
    
$data curl_exec($ch);
    
curl_close($ch);
    if (
$data === false
      return 
false;
    if (
preg_match('/Content-Length: (\d+)/'$data$matches)) {
      return (float)
$matches[1];
      }
    elseif (
preg_match('/content-length: (\d+)/'$data$matches)) {
      return (float)
$matches[1];
      }

I use it on lulzimg.com which is a very heavy traffic site with thousands of images uploaded everyday. And it IS very fast. If it's slow for you, maybe your server's on a congested network or the target urls are responding slow.