Listview load SQL + Images SLOW

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Listview load SQL + Images SLOW
AnoPem
Hello i have a code where im loading information from a SQL database and then load images into an listview, my problem is that its very slow loading everything because i have 800+ items, probably because of the images.
What im doing is i load the database and then load images from a folder with the same id, to an imagelist and then use the id to associate in the listview.

Now my question is there any smarter way to achieve this, but with faster loading, so that it would not take more than 10 seconds to load everything?

I cant post my code right now, since im not home but, if its needed i will post it.
https://t.me/pump_upp
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

I would say using a backgroundworker/threads could be the way to go. However, in my experience you'll find it hard to get it all to load as fast as you'd like.

It will most likely be due to loading all the images in to the listview depending on image dimensions and file size. If you don't need to show all the images at once then you could try 'paging' them like loading the first 50 and having a back/forward button to show the next 50 etc. It all depends on what you're trying to create and how you want to deliver it to the user.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: Listview load SQL + Images SLOW
AnoPem
CodenStuff wrote:
I would say using a backgroundworker/threads could be the way to go. However, in my experience you'll find it hard to get it all to load as fast as you'd like.

It will most likely be due to loading all the images in to the listview depending on image dimensions and file size. If you don't need to show all the images at once then you could try 'paging' them like loading the first 50 and having a back/forward button to show the next 50 etc. It all depends on what you're trying to create and how you want to deliver it to the user.
Im already using a thread with a splash screen for it to load, but on one pc it waits in splash screen and on another it goes into the program while still showing the splash screen
https://t.me/pump_upp
3 posts Page 1 of 1
Return to “Coding Help & Support”