hints on using a clistview with a really large dataset
-
Hi there, I'm trying to implement a clistview (MFC) which has a really large dataset attached to it. By really large I mean around 4000 columns and 4000 rows. Each cell in the list contains just a single character. I'm having trouble with scrolling around the list, scrolling is very slow and ugly as the screen updates. I've tried using the CMemDC files that are available and that helped a bit, but not much. You can still see a kind of shuddering as the screen fills itself. The data is not stored in a database. It is loaded into memory from a text file. Basically the text file contains 4000 strings of 4000 characters in length. Each string is split up into individual characters and they are loaded into the Clist view at runtime. If anybody has any hints on how to speed up scrolling around a large list, I'd be really grateful! perhaps I should be using a class other than CListView?? mick
-
Hi there, I'm trying to implement a clistview (MFC) which has a really large dataset attached to it. By really large I mean around 4000 columns and 4000 rows. Each cell in the list contains just a single character. I'm having trouble with scrolling around the list, scrolling is very slow and ugly as the screen updates. I've tried using the CMemDC files that are available and that helped a bit, but not much. You can still see a kind of shuddering as the screen fills itself. The data is not stored in a database. It is loaded into memory from a text file. Basically the text file contains 4000 strings of 4000 characters in length. Each string is split up into individual characters and they are loaded into the Clist view at runtime. If anybody has any hints on how to speed up scrolling around a large list, I'd be really grateful! perhaps I should be using a class other than CListView?? mick
Why do you need a separate column for each character? It will go much faster if you had 4000 characters in one column. ----------------------------- Get trial copy of comment generating tool CommentMakerPro, std::string and std::string containers viewer FeinEvaluatorPro and windows manager for Microsoft Visual Studio .NET FeinWindows at www.FeinSoftware.com
-
Why do you need a separate column for each character? It will go much faster if you had 4000 characters in one column. ----------------------------- Get trial copy of comment generating tool CommentMakerPro, std::string and std::string containers viewer FeinEvaluatorPro and windows manager for Microsoft Visual Studio .NET FeinWindows at www.FeinSoftware.com
Hi vladfein, The application I'm working on is for molecular biologists. Each character represents a single "letter" in a DNA sequence. Each character has to be colored a different color depending on what letter it is, has to be selectable with a mouse, etc. If there's a way to do this with a string that would be great, but the only way I could think of was to pDC->TextOut each individual character one at a time, changing the color between each character... this turned out to be considerably slower than the cviewlist option. Mick
-
Hi vladfein, The application I'm working on is for molecular biologists. Each character represents a single "letter" in a DNA sequence. Each character has to be colored a different color depending on what letter it is, has to be selectable with a mouse, etc. If there's a way to do this with a string that would be great, but the only way I could think of was to pDC->TextOut each individual character one at a time, changing the color between each character... this turned out to be considerably slower than the cviewlist option. Mick
Actually, I am sure you can display 4000 x 4000 table of characters in a custom CScrollView-derived view faster than CListCtrl with 4000 columns would. The trick is to only paint what you have to. ----------------------------- Get trial copy of comment generating tool CommentMakerPro, std::string and std::string containers viewer FeinEvaluatorPro and windows manager for Microsoft Visual Studio .NET FeinWindows at www.FeinSoftware.com
-
Hi there, I'm trying to implement a clistview (MFC) which has a really large dataset attached to it. By really large I mean around 4000 columns and 4000 rows. Each cell in the list contains just a single character. I'm having trouble with scrolling around the list, scrolling is very slow and ugly as the screen updates. I've tried using the CMemDC files that are available and that helped a bit, but not much. You can still see a kind of shuddering as the screen fills itself. The data is not stored in a database. It is loaded into memory from a text file. Basically the text file contains 4000 strings of 4000 characters in length. Each string is split up into individual characters and they are loaded into the Clist view at runtime. If anybody has any hints on how to speed up scrolling around a large list, I'd be really grateful! perhaps I should be using a class other than CListView?? mick
Use a virtual list control. Rather than loading all the rows when the list is created you just load the columns assoicated with the rows that are displayed. You recieve "scrolling" messages, (both up and down), that tell you when additional row data is required. Just look up "virtual list control" in your MSDN documentation. Or check out some of these articles. Code Guru article[^] MSDN Article[^] Other Article[^] Sam