cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

Organization logos drag down page performance #196

Closed utrenkner closed 8 years ago

utrenkner commented 8 years ago

As we originally tested YAWIK without a lot of logos, this problem did not show up earlier: The loading of organization logos from MongoDB for use in the jobboard significantly drags down page performance. Not only is it terribly slow to start with (in our case load times of sometimes 2+ seconds per image), the problem is exacerbated by overwriting our usual caching header for image files (we usually send Cache-Control: max-age=31536000). Instead, YAWIK serves the logos with these headers:

Cache-Control: max-age=31536000, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache

The effect of this is all too visible in webpagetest.org under repeat view, e.g. http://www.webpagetest.org/result/160405_VB_PZA/

Without using a caching server such as Varnish, I see three options to improve YAWIK's jobboard performance:

cbleek commented 8 years ago

I would like to use assetic for these issues

https://github.com/kriswallsmith/assetic

cbleek commented 8 years ago

sorry, not closed

utrenkner commented 8 years ago

Thanks @cbleek

I had never heard of assetic. But it looks pretty good and should be able to solve our problem. Do you have experience with it? Would it be difficult to integrate it in YAWIK?

Btw: We switched on HTTP/2 server push, today. Now, all static assets are pushed to HTTP/2 capable browsers even before the HTML arrives. But this shows even more, how long it takes to serve the organization logos - here a video of the page loading in slow motion: http://www.webpagetest.org/video/view.php?id=160407_44c0efbdbd2ec9034f0c0ce697d7cb4af9f0c7fc (Fortunately it also shows that the problem is not too big: The page is usable and looks good after 1.7s. And the reflow of the text in the rows - when the logos come in - is not too bad.)

TiSiE commented 8 years ago

This will be addressed with #298