views:

221

answers:

9

will it get "laggy" if i fetch 1 million link elements and put it in the DOM.

cause i want a navigation list on top..its kinda like the one Apple's got on their site and you can scroll left or right with your keyboard. the only difference is that the center image will be get larger in size compared to the others.

the link elements will be like:

 <a><img src.../ ></a>

will it be a bad idea to have 1 million link elements in this scrollbar. cause i want all links (added by users) to be shown. what are the other possibilities?

and does anyone know these kind of animation plugins?

thanks!

+5  A: 

Yes, one million links will cause your page to be very laggy. You should load only the number of links that are visible at the time, like paging.

Also, you dont want to load one million images on a page, that will cause a lot of lag and your server might not like the load if you have more than one user. (one user's bandwidth might not be able to put enough load on the server to cause problems.)

John Boker
+1 But maybe a bit more than what's showing, to make the paging smooth (for instance, if the page size is 50, keep the 50 before and 50 after the 50 that are showing around as well; when the user pages, you can show the new page instantly and then grab the 50 that are now just off-screen in the background).
T.J. Crowder
@crowder. do you know such plugin?
weng
+5  A: 

only the data transfer will take forever. have you counted that?

dusoft
+1 for imagining 50 megabytes of links.
Agos
+6  A: 

Unless you actually expect users to scroll through all of your one million links, I think the user interface itself needs some rethinking. And yes, the page would get very "laggy" with that amount of information in it.

calmh
+2  A: 

It's not a good idea to put 1 million links inside a scrollbar. You should check if you can put a much smaller number of links inside your scrollbar (lets say 20) and load the others on demand while forgetting those links that got invisible by scrolling.

tangens
but i want to have the smooth scrolling animation between elements. do you know such plugin?
weng
@noname It's a terrible user interface design. Lets say a user might spend 1/2 second looking at a particular image to see if it's interesting. It takes another 1/2 second for the next image to scroll into view. So, staring at the screen, scrolling over images at about 1 per second, it would take your user almost six days to get just halfway through the list.
Pointy
@pointy..thats the point=)
weng
+7  A: 

Yes, putting 1 million items in a GUI element will:

  1. be slow
  2. break usability guidelines.

Instead try to organize your information into tags or categories, and offer the user:

  • paging
  • sorting
  • filtering
  • favorite lists
  • etc...

Look at how Stack Overflow's question list works, for example.

Mark Byers
+1  A: 

Can you imagine how awful your user experience would be, having to manually scroll over a million items? Do you know how big "1,000,000" is?

Create a paginated table if you've got lots of things to look at, and add search/filter facilities. Put your computers to work making your users' lives easier.

Pointy
+1  A: 

About other possibility: create single large picture and handle onclick event, then translate coordinates either on client or on server, to map it to one of millions possible urls

Dewfy
+3  A: 

the question is you won't be able to do that

i did one stress testing on my site, loading plain text table 40k rows, one row 4 cells, each cell no more than 5 words ...

IE crashed, Firefox managed to get out with 1G ram usage ... takes forever to scroll ...

so your 1M images is an mission impossible ... too bad

Dapeng
oh great ... i trust ur results and all the answers here...now i know its mission impossible 4!
weng
+1  A: 

Won't someone please think of the children users!?

Seriously, what is the point of giving a user a list of 1 million links? 100 links would be daunting for a user to scroll through. You want to multiply that by 10000?

You mentioned the Apple site...where are they using this on their site?

DA