LancelotP / satisfactory-map

MIT License
77 stars 19 forks source link

Most images not cached in Firefox #30

Open KenMerritt opened 5 years ago

KenMerritt commented 5 years ago

Describe the bug I really want to use your map as it has more features than the other Satisfactory maps, but the webpage is unbelievably slow to use. I finally noticed today that if I zoom in and keep scrolling the page around in a circle I can max my internet out at 100%. So I started digging and discovered that many if not most of the images that make up the background of the map aren't being cached by my browser. I just keep downloading the images over and over again. In less than a minute I downloaded 50MB from just scrolling the map around in a circle. That other map website, the one with a dash in the name, It used 5MB in the same minute scrolling in a circle.

To Reproduce

  1. Go to https://www.satisfactorymap.com/static/tiles/5/6/7.png in Firefox and hit F12
  2. Click on the Network tab across the top
  3. Click the address bar and hit enter, repeat several times
  4. Notice that every time you click the address and hit enter it downloads the image again

Expected behavior

  1. Go to https://www.satisfactorymap.com/static/tiles/5/4/13.png in Firefox and hit F12
  2. Click on the Network tab across the top
  3. Click the address bar and hit enter, repeat several times
  4. Notice unlike before that it uses the cache instead of redownloading over and over

Desktop (please complete the following information):

Additional context I'm not sure why some of your images are being cached and others not, but hopefully that's enough of a clue to help you find the issue. Based on how slow the site has always been for me I believe this is happening on both of my computers as well as my Android tablet. I have slow internet so this problem is very noticeable, those with fast internet probably wouldn't notice.

LancelotP commented 5 years ago

Thanks for the detailed feedback, I've worked a bit on asset caching but did not dig too much after we switched the background rendering.

I'm just back from vacation I'll have a look this week