Skip to content

[WIP] Use exif_thumbnail to read exif image preview - #7242

Closed
PVince81 wants to merge 1 commit into
masterfrom
preview-exifthumbnail
Closed

PVince81 wants to merge 1 commit into
masterfrom
preview-exifthumbnail

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

This should be much faster, but in some cases the exif preview might not be updated by image apps.
Still, nice performance improvement.

Please have a try and compare with master.

@georgehrke @jancborchardt

Needs to be tested more thoroughly.
It might work with tiff files, not tried yet.

@PVince81

Copy link
Copy Markdown
Contributor Author

TODO: only call getLocalFile() once, as it will dowload to a temp file when using ext storage.

@georgehrke

Copy link
Copy Markdown
Contributor

Code looks good. I'll test it tomorrow

@PVince81

Copy link
Copy Markdown
Contributor Author

Just fixed the localfile part.
Also I tried deleting the thumbnails for a folder full of images then reloading the page: the thumbnails appeared almost immediately !

Need to test with:

  • JPG with exif thumbnail
  • JPG without exif thumbnail
  • PNG (no thumbnails, fallback, hopefully not performance impact)
  • TIFF (might work, might not)

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: No new issues

@bantu

bantu commented Apr 20, 2014

Copy link
Copy Markdown

👍 Patch looks good.

@bantu

bantu commented Apr 20, 2014

Copy link
Copy Markdown

Please note that there does not seem to be a dependency on an EXIF PHP module as this function seems to be in core.

@jancborchardt

Copy link
Copy Markdown
Contributor

@owncloud/designers check it out! :)

@PVince81

Copy link
Copy Markdown
Contributor Author

One thing I don't like here is that for images that don't have embedded thumbnails this means one extra file access, access that will fail when no thumbnail is found then falls back to the regular method.
But that might be acceptable.

This still needs testing.

@PVince81

Copy link
Copy Markdown
Contributor Author
  • test with encryption enabled

@MorrisJobke

Copy link
Copy Markdown
Contributor

@PVince81 This needs some love

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 any progress on this?

@PVince81

PVince81 commented Sep 9, 2014

Copy link
Copy Markdown
Contributor Author

No, and I'm still worried a bit about performance.
The thumbnail call opens the file and if no thumbnail is found, the fallback will need to open the file again.

@ghost

ghost commented Nov 21, 2014

Copy link
Copy Markdown

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/3052/

Build result: FAILURE

[...truncated 124 lines...]Checking out Revision e6b8a36 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f e6b8a36 > git rev-list 28dcb5277015c13914cd6a55c57fde37c583a8fb # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveCleaning workspace > git rev-parse --verify HEAD # timeout=10Resetting working tree > git reset --hard # timeout=10 > git clean -fdx # timeout=10 > git submodule foreach --recursive git reset --hard # timeout=10 > git submodule foreach --recursive git clean -fdx # timeout=10Triggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 5 minutes
💣 Test FAILed. 💣

@PVince81

Copy link
Copy Markdown
Contributor Author

Hmm, might be possible to save a file access by reading the thumbnail through http://php.net/manual/en/function.exif-read-data.php when calling getOrientation()

@oparoz

oparoz commented Nov 27, 2014

Copy link
Copy Markdown
Contributor

Keep in mind that exif_thumbnail only works for JPEGs and the filetype should be checked first.
Already done for getOrientation() in this PR
#12398

@PVince81

Copy link
Copy Markdown
Contributor Author

@oparoz yes, it's thanks to your PR that I got the idea from my last comment.

@nickvergessen

Copy link
Copy Markdown
Contributor

@PVince81 needs to be rebased.

@PVince81

PVince81 commented Dec 2, 2014

Copy link
Copy Markdown
Contributor Author

I won't work for this for a while, so if anyone would like to take over, feel free.
Would be good to consolidate together with getOrientation() to have only a single file access (#7242 (comment)). Remember that every file access (fopen) might potentially cause a temporary file to be downloaded from ext storage.

@LukasReschke LukasReschke changed the title Use exif_thumbnail to read exif image preview WIP: Use exif_thumbnail to read exif image preview Feb 24, 2015
@LukasReschke LukasReschke changed the title WIP: Use exif_thumbnail to read exif image preview [WIP] Use exif_thumbnail to read exif image preview Feb 24, 2015
@ghost

ghost commented Apr 30, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/12101/
💣 Test FAILed. 💣

nooo432

@PVince81

PVince81 commented Jul 3, 2015

Copy link
Copy Markdown
Contributor Author

I think I'd rather close this due to the potential performance issue with external storage.

@oparoz what do you think ? Maybe you have a better idea ?

@oparoz

oparoz commented Jul 3, 2015

Copy link
Copy Markdown
Contributor

I think this won't work any more because the providers are used exclusively to generate the max preview which will be re-used later.

So the first scan might be slower than using exif_thumbnail, but everything else, when using the slideshow or the Gallery app is much faster.

I don't see how we could mix things up, especially since this is for a limited number of formats.

@PVince81

PVince81 commented Jul 3, 2015

Copy link
Copy Markdown
Contributor Author

@oparoz great, thanks a lot for the information as you know a lot more than I do regarding previews. 😄

Closing.

@PVince81 PVince81 closed this Jul 3, 2015
@PVince81
PVince81 deleted the preview-exifthumbnail branch July 3, 2015 14:21
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants