I'm creating a web application that is visually enormous. I'm talking 2 million pixels wide and 2 million pixels tall (about).

My goal is to show dynamically changing spots all over the site. For loading's sake, would it be best to load a single large, low quality image per screen view? or show about 2000 html elements per screen view?

I have about 255 "sections" on the site, each section is 120,390px square. I only show the correct section on the screen, which means I would only ever see 4 sections at a time. Inside of these sections I have little spots that are about 30px square. each little square is being pulled from a database to get the color, which could potentially change at any time. But these squares are only pulled when the user's view goes there. So at most, it would show around 2-3000 squares.

Again, would it be less processing power and faster to load a single picture (let's say the picture is about 5000px wide, with the colors on it, it would be around 50k at low quality) or would it be faster/better to load every square individually?

  • I've seen websites that load pictures in small sections, but I was never a big fan of that technique, and nowadays there's enough horsepower in everyone's machine and internet bandwidth where you don't have to do that sort of thing anymore, especially for a 50K picture. – Robert Harvey Apr 21 '15 at 22:24
  • In addition to what Robert said, for performance questions like this, the correct answer is almost always slap together a few quick prototypes, grab a profiler and find out for yourself. Even if some of us know for sure which approach is "faster", you'll learn so much more from building those prototypes that there's really no point in us attempting to answer this for you. – Ixrec Apr 21 '15 at 22:27
  • @RobertHarvey, Yeah, i've been reading up and it seems that google earth has something like 10,000 elements sometimes. at least that's their golden number. They say something like 50,000 elements is a high-point... – ntgCleaner Apr 21 '15 at 22:38
  • 2
    Google does load their maps in sections, at gradually increasing levels of detail. If you're doing something like that, Google is a good model to follow. – Robert Harvey Apr 21 '15 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.