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.
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
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.
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.
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.
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.
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.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
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.
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023