Skip to content

Conversation

@LukasReschke
Copy link
Member

@LukasReschke LukasReschke commented Aug 27, 2016

  1. Set proper caching headers (Pragma: cache)
  2. Resize image proportionally to a max size of 1920px
  3. Store images with progressive mode

This resizes a previous 2.8 MB picture to 300kb and makes it rendering going down from 11 seconds to less than 1 here. And future requests won't have to download the file newly.

As a comparison these two GIFs show the rendering before and after the PR on initial page load:

old
new

(force reload the page to see it rendering)

Note that due the caching headers all future page loads will instantly show the right data. Something that is at the moment not properly done.

@ChristophWurst This should make you happier 😉


Fixes #1099

1. Set proper caching headers (`Pragma: cache`)
2. Resize image proportionally to a max size of 1920px
3. Store images with progressive mode

This resizes a previous 2.8 MB picture to 300kb and makes it rendering going down from 11 seconds to less than 1 here. And future requests won't have to download the file newly.
@mention-bot
Copy link

@LukasReschke, thanks for your PR! By analyzing the annotation information on this pull request, we identified @schiessle, @juliushaertl and @nickvergessen to be potential reviewers

@LukasReschke LukasReschke added this to the Nextcloud 11.0 milestone Aug 27, 2016
@LukasReschke
Copy link
Member Author

  1. OCA\Theming\Tests\Controller\ThemingControllerTest::testUpdateLogoLoginScreenUpload
    imagejpeg() expects parameter 2 to be a valid path, resource given

Let's see why this PHP version behaves differently sigh

@LukasReschke LukasReschke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Aug 27, 2016
@LukasReschke LukasReschke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 27, 2016
@LukasReschke
Copy link
Member Author

Also @jancborchardt, since he complained about the performance ;)

@ChristophWurst
Copy link
Member

👍

@jancborchardt
Copy link
Member

Wow – very significant improvement. Very cool 👍 :) Yay for performance 🚀

@jancborchardt jancborchardt merged commit 48a307f into master Aug 27, 2016
@jancborchardt jancborchardt deleted the improve-theming-performance branch August 27, 2016 21:18
@juliusknorr
Copy link
Member

@LukasReschke Awesome improvement. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants