|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-05 06:09 UTC] kalle@php.net
-Status: Open
+Status: Feedback
[2016-08-05 06:09 UTC] kalle@php.net
[2016-08-05 06:09 UTC] kalle@php.net
-Type: Bug
+Type: Feature/Change Request
[2016-08-14 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 21:00:02 2025 UTC |
Description: ------------ Per Twitter exchange with @pierrejoye The exif_read_file function checks whether the file is accessed over stdio. If it is accessed over stdio, VCWD_STAT() is used to get the size of the file efficiently. If it is accessed by any other means, this pattern is used: php_stream_seek(ImageInfo->infile, 0, SEEK_END); ImageInfo->FileSize = php_stream_tell(ImageInfo- >infile); php_stream_seek(ImageInfo->infile, 0, SEEK_SET); Moving the seek pointer to the end can trigger slow, bandwidth-hungry network operations for remote stream wrappers, such as S3 wrappers. Please test whether the stream implements the stat operation and, if so, use it to avoid this performance hit. I was able to work around the problem by teaching my stream wrapper to specifically tolerate the "seek to the end / ftell / seek to the start" pattern and return cached data.