-1

The ability of a browser (Chrome for example) to handle a number of images, is limited only by the hardware of the computer on which it is displayed or also by the software itself?

I'm trying to develope an image viewer that must content lot of files that must be accesible instantly depending on the demand of the user and sometimes when i go over 350 files of 300kb the page frozens.

Thank you all for your help!!

Krish R
  • 22,583
  • 7
  • 50
  • 59
merqurio
  • 931
  • 12
  • 24
  • The ability of a computer to instantaneous display a variety of images is limited by the I/O.. this is independet of how a software might be implemented. Please specify the problem that you encounter. – fuesika Dec 11 '13 at 15:18

2 Answers2

0

It is probably limited by both. There are limits to how large a struct is allowed to be for instance, because it has to fit in a fixed amount of bytes. (see this question for instance)

(also, you're not yet running into the max size of an int so that is probably not what is happening right now.)

Besides this there are several more constraints.

That said, loading a gigantic amount of images every time you open a page is probably not a good idea.

Take some inspiration from how others (like google in their image search) have solved this problem simply by not loading the images until they are needed.

Community
  • 1
  • 1
Timothy Groote
  • 8,614
  • 26
  • 52
  • Thank you, I finally succeed loading the 20 images backward the one displayed and the 20 forward. :D – merqurio Jan 12 '14 at 13:14
0

I think the best approach would be to have some small thumbnails of each image and on request of the user(click) load the bigger one, like Timothy said.

If you need it to be faster you can preload images. So for example if you have a list of images and the user scrolls through you just load the next n images. To free space you can "delete" the ones the user did already passed.

Tobi
  • 525
  • 4
  • 7