Autostitch panoramas + EXIF module = very slow execution

edlins

Joined: 2007-03-21
Posts: 4
Posted: Wed, 2007-03-21 23:14

Hello,

I had a problem with panoramic images generated by Autostitch causing execution timeouts in the EXIF module with the following message:

Fatal error: Maximum execution time of 30 seconds exceeded in public_html/gallery2/modules/exif/lib/exifer/exif.inc on line 699

I made a little hack to exif.inc to allow the module to bail out on these images. For my images, this results in no EXIF info from the image, but the module returns quickly without timing out. The hack is for Exifer 1.5 by Jake Olefsky:

change exif.inc lines 744-748 from:

} else if($data=="ffe1") {
$result['ValidEXIFData'] = 1;
}
$data = bin2hex(fread( $in, 2 ));

to:

} else if($data=="ffe1") {
$result['ValidEXIFData'] = 1;
} else if($data=="ffda") { //EXIF SOS Marker
break;
}

$data = bin2hex(fread( $in, 2 ));

I've also attached the moded exif.inc - rename to "exif.inc" and drop in modules/exif/lib/exifer/. Hope this helps someone else..

-s

AttachmentSize
exif.inc_.txt46.16 KB
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-03-21 23:50

Version?
It could have been fixed in G2.2 as the EXIF module was updated a lot.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
edlins

Joined: 2007-03-21
Posts: 4
Posted: Thu, 2007-03-22 03:04

Gallery version = 2.1.2 core 1.1.0.2
PHP version = 5.2.1 cgi
Webserver = Apache Webserver
Database = mysql 5.0.27-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, ImageMagick, Thumbnail, Gd
Acceleration = none, none
Operating system = ... 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27 10:11:19 EST 2007 i686
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11

I haven't upgraded to 2.2 yet, but I'll test again then.

-s

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2007-03-22 03:25
Quote:
I haven't upgraded to 2.2 yet, but I'll test again then.

Let us know and file a bug if you wish.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
edlins

Joined: 2007-03-21
Posts: 4
Posted: Fri, 2007-04-06 18:04

This was solved in the G2.2 upgrade.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-04-06 18:14

Thanks, glad we caught it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team